Code Beautifier

Encoding, Regex & Text

This pillar is where the small, sharp bugs live. Text has three different lengths depending on whether you count bytes, code points or graphemes. Base64 looks like ciphertext but protects nothing. A single invisible character can make two identical-looking strings compare unequal and send an afternoon down a hole. These tools make the underlying representation visible, which is usually all it takes to find the problem.

Tools (20)

Base64 Encode & Decode
Encode plain text to Base64 or decode Base64 strings to UTF-8 text with URL-safe encoding and automatic JSON formatting.
Base64 Image & Data URI Converter
Convert between raw Base64 strings, Data URIs, HTML <img> tags, and CSS background rules with automatic MIME detection.
URL Encode & Decode
Encode, decode, or parse URL query strings and percent-encoded query parameters instantly.
URL Parser & Params Builder
Deconstruct URLs into protocol, host, port, path, hash, and structured query parameters with full decoding.
HTML Entity Encoder & Decoder
Convert special characters to named, decimal, or hex HTML entities and decode encoded HTML entities back to raw text.
Number Base & Radix Converter
Convert numbers instantly between Decimal, Binary, Hexadecimal, Octal, and ASCII with bit-length analysis.
Regex Tester
Test, debug, and validate Regular Expressions in real-time with capturing group extraction and flag controls.
Regular Expression Generator
Generate battle-tested regular expressions with explanation, flags, test cases, and code snippets in JavaScript, TypeScript, Python, and Go.
Diff Checker
Compare two text or code snippets side-by-side to highlight added, removed, and modified lines instantly.
Unified Patch
Generate git-style unified diffs, structured patch JSON, or apply a patch to original text — fully offline.
UUID / ULID / NanoID
Generate or inspect UUID v4/v7, ULID, and NanoID identifiers in bulk — cryptographically random, fully offline.
Timestamp Converter
Convert Unix epoch seconds and milliseconds to human-readable UTC & Local date-time formats instantly.
Color Converter
Convert between HEX, RGB, RGBA, and HSL color formats with channel breakdowns and CSS variable exports.
QR Code Generator
Generate clean, customizable vector SVG QR codes from URLs, text, Wi-Fi keys, and tokens.
Gzip Size Estimator
Measure uncompressed vs Gzip/Brotli compressed byte sizes and bandwidth savings directly in your browser.
Case Converter
Convert identifiers and text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, and URL slugs.
Sort & Remove Duplicate Lines
Sort lines naturally or alphabetically, remove duplicates keeping the first or last, reverse, or shuffle, with line endings preserved.
String Escape & Unescape
Escape text for a string literal in JavaScript, Java, C#, Python, Go, SQL, CSV, or a regular expression, and unescape it back.
Text to Hex & Binary
Convert text to UTF-8 hex or binary and decode it back, accepting plain, spaced, \xNN, %NN, and 0xNN input.
String Inspector
Count graphemes, code points, and UTF-8 bytes, and reveal bidi controls, zero-width characters, unusual spaces, and mixed-script words.

Encoding is not encryption

Base64 is a transport encoding. It maps arbitrary bytes onto a 64-character alphabet so binary survives a text-only channel, and anyone can reverse it without a key. It also inflates size by roughly a third, which matters when a data URI ends up inline in a stylesheet. Base64 Encode and Decode handles text and Base64 Image Converter handles data URIs. When you need actual confidentiality, use AES Encrypt and Decrypt instead.

Bytes, code points and graphemes

A family emoji is one grapheme, several code points and many bytes, and a naive length property reports none of those three reliably. String Inspector breaks a string down all three ways at once, and Text to Hex and Binary shows the actual UTF-8 bytes rather than UTF-16 code units. That distinction is what makes a character count disagree with a database column limit measured in bytes.

Invisible characters cause visible bugs

Zero-width spaces, non-breaking spaces, byte-order marks and bidirectional overrides are all legal inside identifiers and strings, and none of them show up in a normal editor. They make equality checks fail, break copy-pasted shell commands, and in the bidirectional case can make source code read differently to a human than it does to a compiler. String Inspector flags them by position, and Diff Checker shows where two near-identical strings actually diverge. Regex Generator builds a pattern when you need to match or strip one of these character classes deliberately.

Cheat sheets

Guides

FAQ

Is base64 a form of encryption?

No. It is a reversible encoding with no key, designed to move binary data through text channels. Anything base64-encoded can be read by anyone who receives it, so it provides obfuscation at most and no confidentiality at all.

Why does my string length disagree with my byte count?

Because they measure different things. Accented characters and emoji occupy several UTF-8 bytes each, and many languages count UTF-16 code units rather than characters, so a fifteen-character string can easily exceed a twenty-byte column limit.

How do I find an invisible character in a string?

Paste it into String Inspector, which reports each zero-width, non-breaking and bidirectional character with its code point and index. That is usually faster than bisecting the string by hand to work out where an equality check is failing.

How much larger does base64 make a file?

About a third larger, since every three bytes become four characters, plus padding. That overhead is worth remembering before inlining a large image as a data URI in CSS, where it is downloaded on every page load and cannot be cached separately.