Encode text to Base64
Input
Hello, World!Output
SGVsbG8sIFdvcmxkIQ==UTF-8 bytes encoded with the standard alphabet and padding.
Paste text to encode to Base64, or paste a Base64 string to decode it. UTF-8 safe, with URL-safe Base64. Runs in your browser.
Loading tool…
Base64 turns bytes into printable ASCII so text-only channels can carry them. This tool encodes text to Base64 and decodes a Base64 string back to text — UTF-8 safe, in your browser.
Base64 (RFC 4648) maps every 3 input bytes to 4 characters from A–Z, a–z, 0–9, +, and /. Encoding is not encryption: anyone can decode the result.
Use this page to encode text to Base64 or decode Base64 to text. UTF-8 is used, so emoji and non-Latin characters round-trip correctly. Turn on URL-safe mode for Base64URL (JWTs and query strings). Optional data URI output wraps an encode result as data:…;base64,…
If you need percent-encoding, JWT signature checks, or one-way hashes, use those dedicated EverydayTools pages instead.
Encode turns plain text into a Base64 string. Decode turns a Base64 string back into text.
Paste text to encode, or paste a Base64 string (or data URI) to decode. Conversion runs as you type.
URL-safe mode uses - and _ and drops padding. Data URI wraps encode output as data:mime;base64,…
Copy the output, download it as text, or swap input and output to reverse the conversion. Nothing is uploaded.
Input
Hello, World!Output
SGVsbG8sIFdvcmxkIQ==UTF-8 bytes encoded with the standard alphabet and padding.
Input
SGVsbG8sIFdvcmxkIQ==Output
Hello, World!Decode reverses the mapping when the string is valid Base64.
Input
Hello 👋 世界Output
SGVsbG8g8J+RiyDkuJbnlYw=Multi-byte UTF-8 sequences encode like any other bytes. Avoid Latin-1-only btoa() without TextEncoder.
Input
apiuser:s3cr3t!Output
YXBpdXNlcjpzM2NyM3QhAuthorization: Basic plus this string. Always send it over HTTPS — Base64 does not hide the password.
Input
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQOutput
{"sub":"1234567890","name":"John Doe","iat":1516239022}Enable URL-safe mode. This shows claims only; it does not verify the signature.
Standard Base64 uses + and / with = padding so the length is a multiple of 4. URL-safe Base64 (Base64URL) swaps those for - and _ and often omits padding so values survive URLs and JWTs. Text is encoded as UTF-8 bytes. On decode, whitespace and data:…;base64, prefixes are stripped, and strings that contain - or _ are treated as Base64URL.
A data URI embeds the payload inline, for example data:text/plain;charset=utf-8;base64,SGVsbG8=. That is useful for small snippets; large strings bloat HTML by about 33%.
Formula
3 bytes (24 bits) → four 6-bit indices → Base64 alphabet (+ optional = padding)Anyone can decode it. Use HTTPS in transit and real encryption or hashing for secrets.
If the input has spaces or punctuation, it is probably not Base64. Switch to Encode, or paste a real Base64 string.
Enable URL-safe / Base64URL so + and / do not break the URL.
One or two = characters pad the length to a multiple of 4. This decoder adds padding when it is omitted.
Encode UTF-8 bytes first. This tool uses TextEncoder, so emoji and CJK work.
If the preview looks garbled, download the decoded bytes as a file.
Same math. Different alphabet and padding rules.
| Aspect | Standard Base64 | Base64URL |
|---|---|---|
| Alphabet (62–63) | + / | - _ |
| Padding | = to a multiple of 4 | Often omitted |
| Best for | MIME, headers, data URIs | JWTs, query strings, filenames |
| This tool | URL-safe off | URL-safe on |
This page encodes and decodes Base64. Use a different tool when the job is not reversible Base64.
| Related tool | Use this tool when | Use related tool when |
|---|---|---|
| URL Encoder / Decoder | You need Base64 or Base64URL. | You need percent-encoding (%20, %26) for a URL or query string. |
| JWT Decoder | You only need to Base64URL-decode one JWT segment. | You need header, payload, expiry, and signature context together. |
| Hash Generator | You need a reversible encoding. | You need a one-way digest (SHA-256, etc.). |
| Text to Hex | You want Base64 text. | You want a hex dump of the same bytes. |
| HTML Entity Encoder | You need binary-safe ASCII for APIs or headers. | You need & / &#…; escaping for HTML. |
Percent-encoding is a different mapping. Use the URL Encoder / Decoder.
This tool can decode a segment. Signature and expiry checks belong on the JWT Decoder.
Use the Hash Generator. Base64 is reversible.
Continue the workflow with the right follow-up tool.
Advertisement
Base64 is a binary-to-text encoding. It represents bytes as A–Z, a–z, 0–9, +, and / so the data can travel through text-only formats such as JSON, email, and HTTP headers.
Select Encode, paste UTF-8 text, and copy the output. Example: Hello, World! becomes SGVsbG8sIFdvcmxkIQ==. Turn on URL-safe for Base64URL.
Select Decode and paste the string. Whitespace and data URI prefixes are stripped. Use URL-safe mode for JWT-style strings with - and _.
No. It is reversible encoding with no key. Anyone can decode it. Use HTTPS and real cryptography for secrets.
URL-safe Base64 (Base64URL) replaces + with - and / with _ and often omits = padding so the string is safe in URLs, filenames, and JWTs.
Padding keeps output length a multiple of 4. One = means one padding slot; == means two. Base64URL often omits padding.
Yes. This tool encodes UTF-8 bytes, so emoji, accents, and CJK characters encode and decode correctly.
Yes. Every 3 input bytes become 4 output characters — about 33% larger. That expansion is part of the encoding.
Yes. Encoding and decoding on this page run in your browser. The string is not sent to EverydayTools servers.
You can Base64URL-decode one JWT segment to read JSON claims. That does not verify the signature. Use the JWT Decoder for a full token view.
Encoding, decoding, and local file reads run in your browser and are not sent to EverydayTools servers. Copying a share link puts a short snippet in the URL; site analytics may record that URL.
Encode and decode are reversible for valid input. Size grows about 33%. This is not encryption.
Conversion runs in the browser after you paste text or choose a file.
Developer utility. Do not treat Base64 as security. JWT segment decode is not signature verification.
Advertisement
Reviewed by EverydayTools Editorial Team on 2026-09-19.
Same workflow or intent — pick the next step without leaving the site.
Free .env file parser — paste any .env file and extract all environment variables as structured JSON or YAML. Useful for config migration and debugging. No signup needed. Runs locally in your browser when supported—no upload required for normal use.
Generate a secure random API key or webhook secret in your browser. Hex, Base64url, or alphanumeric. Keys stay local—not a Stripe or OpenAI credential.
Design a mock REST response in your browser—JSON body, status, headers, and delay. Copy Express or MSW snippets. Free, no signup. Does not host a live API URL.
Free number base converter: binary, decimal, octal, hex, and custom bases 2–36. Live convert with BigInt for large integers. Browser-local, no signup.
See your browser name and version in one second—plus OS, screen size, and user agent. Copy for support; runs locally with nothing uploaded.
Minify or beautify HTML, CSS, and JavaScript in your browser with UTF-8 size comparisons, copy, and download. No source upload.
Frequently opened tools from the same category.
Free JSON formatter — paste minified or messy JSON and instantly get beautified, indented output with syntax highlighting and error detection. Browser-based, no server upload. Runs locally in your browser when supported—no upload required for normal use.
Free JSON diff & compare — structural side-by-side diff, ignore paths, array modes, RFC 6902 patch and merge patch export. Runs locally in your browser—no upload.
Free UUID generator: v4, v7 & v1 GUIDs in your browser—bulk up to 1,000, validate, export JSON/CSV. crypto.randomUUID; never uploaded.
Free random number generator — Web Crypto integers or decimals, no-repeat draws, dice, coin flip, and list picker. Copy or CSV. Runs locally in your browser.
Cross-category tools others open in the same session.
What is 20% of 500? Percent increase, decrease, difference, reverse %, markup & margin—runs locally in your browser, no upload. Copy results or share a link.
Free JSON formatter — paste minified or messy JSON and instantly get beautified, indented output with syntax highlighting and error detection. Browser-based, no server upload. Runs locally in your browser when supported—no upload required for normal use.
Free word counter — live word, sentence, and paragraph counts plus reading time for essays, blogs, and SEO drafts. Runs locally in your browser.
Free adult BMI from height and weight (lb/ft/in or kg/cm). CDC category, healthy weight range, optional waist. Screening only—runs in your browser.
Browse full tool collections by topic.
0 characters · 0 UTF-8 bytes · Drop a file here to encode it · Max 1,500,000 characters; files about 1 MB text / 2 MB binary
Result appears as you type
Ctrl+Enter convert · Ctrl+Shift+C copy