Text Encoder / Decoder
Paste text, choose Base64, URL or HTML entities, pick Encode or Decode, and the result appears as you type. Nothing is sent anywhere. Below the tool: exactly what each mode does, with real outputs, and where decoding fails.
Free, no sign-upNo uploads, files stay on your deviceSave it to use offline
How To Encode Or Decode Text#
- Choose a mode in the side panel: Base64, URL or HTML entities.
- Choose a direction: Encode or Decode.
- Type or paste into the Input box. The Output box updates on every keystroke.
- Click Copy above the Output box.
Your last mode and direction are remembered in this browser.
What Each Mode Does#
- Base64. The text is turned into UTF-8 bytes first, so accents, Japanese and emoji survive a round trip. Decoding accepts input with the trailing
=padding left off. It does not accept the URL-safe alphabet (-and_); swap those for+and/first. This mode is for text, not files: for an image use the Base64 image tool, and for a file use the Base64 file reconstructor. - URL. Follows the rules of JavaScript's
encodeURIComponent. It leaves letters, digits and- _ . ! ~ * ' ( )alone and encodes everything else, including/ ? & = :and spaces (as%20). That is right for a single value inside a URL, and wrong for a whole address, which would lose its own slashes and question mark. Decoding turns%20back into a space but leaves a plus sign as a plus sign. - HTML entities. Encoding replaces exactly five characters:
&,<,>,"and'. Accented letters are left as they are. Decoding uses the browser's own HTML parser, so named entities (é), decimal (©) and hexadecimal (🙂) references all work.
Worked Example: Real Inputs And Outputs#
| Mode | Direction | Input | Output |
|---|---|---|---|
| Base64 | Encode | Hello, World! |
SGVsbG8sIFdvcmxkIQ== |
| Base64 | Encode | Zoë Müller 日本語 🙂 |
Wm/DqyBNw7xsbGVyIOaXpeacrOiqniDwn5mC |
| URL | Encode | name=Zoë & co/path?x=1 y |
name%3DZo%C3%AB%20%26%20co%2Fpath%3Fx%3D1%20y |
| HTML | Encode | <a href="x">Tom & Jerry's</a> |
<a href="x">Tom & Jerry's</a> |
| HTML | Decode | <p>café & © 🙂 |
<p>café & © 🙂 |
The second row shows why the UTF-8 step matters: the accented letter, the Japanese text and the emoji all come back identical when you decode that string.
When Decoding Fails#
If the input cannot be decoded, a red line under the two boxes says That input isn't valid Base64 to decode (or URL). The Output box is not cleared, so it still shows the previous result. Look for the message before you copy.
One case is easy to miss: Base64 that is perfectly valid but does not contain UTF-8 text, such as the bytes of an image, also produces this message, because the tool tries to turn the bytes into readable text. Use the Base64 file reconstructor for those. And remember that Base64 is an encoding, not encryption: anyone can decode it.
How We Tested This#
On 2 November 2026 we loaded this tool's own code into headless Chromium on a Linux cloud server and ran 19 checks. All 19 passed.
| What we checked | Checks |
|---|---|
| Base64 encode, decode and a full round trip with accents, Japanese and emoji | 4 |
| Base64 edge cases: input without padding decodes, URL-safe characters are rejected, valid Base64 of non-text bytes reports an error, garbage input reports an error | 4 |
| URL encode (including the characters that stay unescaped), plus sign kept on decode, invalid percent sequence reports an error | 4 |
| HTML encode, decode of named, decimal and hex entities, accents left alone | 3 |
| Empty input gives empty output; the Copy button copies the output | 2 |
| No script errors and no network requests | 2 |
Not tested: very long inputs, and browsers other than Chromium.
Frequently asked questions#
Is Base64 a way to hide or protect text?
No. Base64 only changes how text is written, and anyone can reverse it. To protect text, use the encrypt and decrypt tool.
Is my text sent to a server?
No. Encoding and decoding happen in your browser. We saw no network requests while testing.
Why does a plus sign stay a plus sign when I decode a URL?
The URL mode follows decodeURIComponent, which only reverses percent sequences like %20. Form-style plus signs are not turned into spaces.
Why does valid Base64 of an image give an error?
The Base64 mode decodes to text. Image bytes are not valid text, so the tool reports an error. Use the Base64 file reconstructor to get the file back.
Which mode should I use for a value inside a query string?
URL. It encodes the characters that would otherwise end the value early, such as &, = and #. Encode only the value, not the whole address.
Where to go next#
- Base64 image encoder / decoder: turn an image into a data URI and back.
- Base64 file reconstructor: get the original file back from Base64 or a data URI.
- URL parser and builder: take a whole address apart and rebuild it with encoded parameters.
- JWT decoder: read the Base64 sections of a token.
- Encrypt / decrypt text: when the text actually needs protecting.
More Text & Dev Tools
See all 111 Text & Dev Tools →- Base32 Encoder / DecoderBase32 encode/decode, alongside the existing Base64 tool.
- Encrypt / Decrypt TextEncrypt or decrypt text with a passphrase using AES-256-GCM — entirely in your browser.
- JWT DecoderBreak a JWT down into header, payload, and signature.
- X.509 Certificate DecoderDecode certificates and CSRs into readable fields.
- Base64 → File ReconstructorPaste Base64 or a data URI and get the original file back — any type, detected from its real bytes. Repairs damaged input, extracts every embedded file from JSON/CSS/HTML, previews and inspects the result, and encodes any file to Base64 too.
- Hash GeneratorMD5, SHA-1, SHA-256, SHA-384, and SHA-512 for text or a file.
- JWT Builder & SignerCreate and sign HS256, RS256 and ES256 tokens locally.
- Password Generator & Strength CheckerGenerate random passwords or passphrases, or check an existing password's real crack time — pattern-aware, not just a character count.