String Encode/Decode Tool
URL, Base64, HTML, hex, ROT13, Morse and JSON escaping.
About String Encode/Decode Tool
String Encode/Decode: Base64, URL Encoding, HTML Entities, Hex and More
Paste text, pick an operation and get the result. The tool handles URL encoding, Base64, HTML entities, hex, ROT13, Morse code and JSON string escaping, each in both directions where that makes sense. Text gets converted to UTF-8 bytes before encoding, so accented letters and emoji survive the round trip.
Base64
Base64 turns bytes into 64 safe ASCII characters (A-Z, a-z, 0-9, +, /), with = as padding. Every 3 bytes become 4 characters, so the output is about 33% larger. Hello encodes to SGVsbG8=.
You see it in email attachments (MIME), data: URIs, HTTP Basic auth headers and the parts of a JWT. This tool uses the standard alphabet. JWTs and some APIs use the URL-safe variant with - and _, so swap those characters back before decoding.
URL encoding (percent encoding)
URL encoding replaces each byte outside the safe set with % plus two hex digits. café & tea/1? becomes caf%C3%A9%20%26%20tea/1%3F. Spaces become %20, and / stays as is so you can encode a whole path. If you're encoding a single query value that contains /, replace it with %2F yourself. HTML forms encode spaces as +, and URL decode leaves a + unchanged.
HTML entities
HTML escaping converts < > & " ' to entities like < and ", so a browser shows them as text and doesn't parse them as markup. Unescape turns entities, including named ones like é, back into characters. Escaping user input before you put it in a page is one of the main defenses against cross-site scripting.
The other operations
- Hex encode/decode: each byte as two hex digits.
Hibecomes4869. - ROT13: shifts each letter 13 places. Run it twice to get the original back. People use it to hide spoilers, never for security.
- Morse encode/decode: letters, digits and basic punctuation, with a space between each symbol. Word breaks aren't kept, so decoded text comes back without spaces.
- JSON encode/decode: wraps text in quotes and escapes quotes, backslashes and newlines, ready to paste into a JSON document. Decode does the reverse and also parses whole JSON values.
Encoding is not encryption
Anyone can decode Base64, hex or ROT13 without a key. Don't use them to hide passwords or tokens. For one-way fingerprints, use the Hash Generator.