Text to Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 to text. Free, private, browser-based.
Runs in your browser — nothing is uploaded. Verify it
About the Text to Base64 Encoder & Decoder
Encode text to Base64 with this Base64 encoder, or decode Base64 strings back to text. Handles Unicode, URLs and long strings, with a character count and nothing sent to a server.
Base64 lets you safely pass text through systems that only handle ASCII.
How to use the Text to Base64 Encoder & Decoder
- Paste your text or Base64 string.
- Choose encode or decode.
- Copy the result.
What the encoder produces, option by option
| Option | Output for "Hello, world! \ud83d\udc4b Voilà — café \u2615" | When you need it |
|---|---|---|
| Standard | SGVsbG8sIHdvcmxkISDwn5GLIFZvaWzDoCDigJQgY2Fmw6kg4piV (52 characters, no padding) | Emails, file names, anything where + and / are safe. Measured: 39 UTF-8 bytes in, 52 Base64 characters out — 1.33\u00D7, the +33% overhead every Base64 consumer expects. |
| URL-safe, unpadded | SGVsbG8sIHdvcmxkISDwn5GLIFZvaWzDoCDigJQgY2Fmw6kg4piV (same length, no = characters) | URLs, JWT segments and file names, where + and / would break the surrounding syntax. Decoding accepts either alphabet either way — a pasted URL-safe payload is folded back to the standard one before validation. |
| Wrap at 76 | A 300-character payload becomes 4 lines: three of 76 characters and one of 72 | MIME conventions, PGP keys and anything that gets diffed or printed. Decoding ignores line breaks, so a wrapped payload still round-trips byte for byte. |
| data: URL accepted | data:text/plain;base64,SGVsbG8sIHdvcmxkIQ== decodes to "Hello, world!" and reports the detected type text/plain | Decoding a value that was pasted out of a CSS file, a page source or a clipboard — the prefix is stripped, not rejected. |
| JWT shortcut | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.<segment>.SIG \u2192 the middle segment decodes to {"alg":"HS256","typ":"JWT"}, pretty-printed | Reading a token's claims without signing or validating it. The shortcut switches to decode mode, decodes just the payload segment and re-indents the JSON so it can be read. |
The size readouts measure the bytes that were actually encoded, never a re-encoding of the result, so the number beside a value can never disagree with it. Everything runs in the browser; nothing is uploaded.
Frequently asked questions
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used to encode data for transmission over media designed to deal with text.
Is my data private?
Yes! All processing happens entirely in your browser using JavaScript. Your text is never uploaded to any server, ensuring complete privacy.
What is URL-safe Base64?
Standard Base64 uses characters like + and / which have special meanings in URLs. URL-safe Base64 replaces them with - and _ to prevent breaking links.
Why is Base64 output longer than the input?
Base64 represents 3 bytes of data as 4 characters, so the output is always about 1.33 times the input byte length, plus up to two padding = characters. A 39-byte input becomes 52 Base64 characters. Padding and wrapping add to that, and decoding recovers the original byte count exactly.
Can it decode a data: URL or a JWT segment?
Yes. A pasted data:text/plain;base64, payload has its prefix stripped and the media type is reported. For a JWT, the JWT payload shortcut decodes the middle segment (the claims) and pretty-prints it as JSON, because that is the only reason to reach for it.
Guides
- How to Use a Base64 Encoder/Decoder (Complete Guide)
Learn how to use a Base64 encoder and decoder. A practical guide to encoding and decoding text and binary data.
- How to Compare Two Texts Online: Diff Without Uploading
Learn how to compare two texts online. A line-by-line diff shows every added, removed and unchanged line, side by side or unified, with nothing uploaded to a server.
- Why Is Your Typing Test Score Off? The Fixed-Sample Method
Most free typing tests show a single WPM number and stop there. This guide explains the three WPM definitions, why a random sample makes two runs uncomparable, and how to read your own result card.
More Text tools
- Word Character CounterCount words, characters, sentences, paragraphs, and reading time. Free, browser-based.
- Text Case ConverterConvert text between uppercase, lowercase, title case, sentence case, camelCase, snake_case, kebab-case.
- URL Encoder / DecoderEncode and decode URL percent-encoded strings, entirely in the browser.
- Text RepeaterRepeat any text online free. Set repeat count and separator. Copy or download.
- Typing Speed TestMeasure your words per minute and accuracy against a fixed sample. No signup, no upload, no account —…
- Text DiffCompare two texts online free. Line-by-line diff with side-by-side and unified views, ignore whitespace and…