Encode or decode text using Base64, URL percent-encoding, HTML entities, Unicode escapes, or ROT13, with live conversion as you type. Copy or download the result.
Binary-safe encoding often used for embedding data in text, URLs, or JSON.
Text encoding transforms text from one representation into another for a specific practical reason — making it safe to embed somewhere with syntax restrictions, representing it in a different character format, or (in ROT13's case) simply obscuring it for lighthearted reasons. Different formats exist because they solve genuinely different problems: Base64 solves the problem of representing arbitrary data as printable text, URL encoding solves the problem of safely including text inside a URL's reserved syntax, HTML encoding solves the problem of displaying literal special characters inside HTML without them being interpreted as markup, and Unicode escapes solve the problem of representing any character using only a fixed, portable ASCII notation. This tool brings five of the most commonly needed formats together in one place, since developers routinely need to encode or decode several of them across during everyday debugging and integration work.
Base64 encoding takes raw bytes and maps every group of three bytes to four printable ASCII characters drawn from a 64-character alphabet (A–Z, a–z, 0–9, +, /), padding the final group with '=' characters if needed — this tool first converts your text to UTF-8 bytes, then Base64-encodes those bytes, and reverses the process symmetrically for decoding. URL encoding (percent-encoding) replaces any character outside a small 'safe' set with a percent sign followed by that character's two-digit hexadecimal byte value, which is exactly what the browser's own encodeURIComponent and decodeURIComponent functions implement. HTML encoding replaces the five HTML-significant characters with named character entities, while decoding uses the browser's own HTML parser to reverse any named, decimal, or hexadecimal entity it encounters. Unicode escaping walks through each character, converts its numeric code point to four-digit hexadecimal, and prefixes it with \u (using a surrogate pair for characters beyond the Basic Multilingual Plane, like most emoji). ROT13 simply shifts every alphabetic character 13 places through the alphabet using modular arithmetic, leaving every other character untouched.
If you're debugging why a URL isn't working correctly and suspect a query parameter has special characters in it, URL decode the suspicious segment to see its actual, unescaped value. If you're inspecting an API token, a JWT header/payload segment, or a Basic Authentication header, Base64 decode it to reveal the underlying JSON or credential string. If you're preparing user-generated text to safely embed inside an HTML template without risking it being interpreted as markup, HTML encode it first. If you're debugging a string that displays unexpected or invisible characters, Unicode encode it to see every character's exact code point rather than relying on how it happens to render visually. And if you just want a bit of harmless, reversible text obfuscation for something like a spoiler or a puzzle answer, ROT13 is the simple, well-known choice.
It's worth being explicit about a common point of confusion: none of the five formats in this tool provide any real confidentiality or security. Base64, URL encoding, HTML encoding, and Unicode escaping are all fully reversible, publicly documented, standard encodings with no secret key involved — anyone can decode them instantly, including this tool itself. ROT13 is even more explicitly a novelty rather than a security measure, historically used only to prevent accidentally spoiling a joke or puzzle answer at a glance, not to protect anything genuinely sensitive. If you need to protect data's actual confidentiality, use real, properly implemented encryption with a secret key — never mistake any of these encodings for a substitute.
This tool converts your input as you type, with no separate 'convert' button to click, so you can see the result update in real time as you adjust your text or switch formats and modes. Because decoding operations (Base64, URL, and to a lesser extent HTML) can fail on malformed input — an invalid Base64 length, a stray unescaped percent sign — this tool surfaces a clear, specific error message explaining what's wrong rather than silently producing garbled output or a cryptic browser exception, so you can quickly identify and fix a data problem rather than guessing at what went wrong.
Text Encoder/Decoder combines five common formats in one tool. These related tools go deeper on a single format or a nearby text transformation.