Text & Code Utilities
A comprehensive set of text and code utilities available on a single page.
You can count characters, words, lines, and UTF-8 bytes in real time by typing or pasting text.
The tool also includes HTML escaping and unescaping, as well as HTML and XML encoding and decoding, making it easy to safely handle markup and structured content.
For quick cleanup, a lightweight CSS and JavaScript minifier is provided
to remove comments and unnecessary whitespace for simple snippets.
In addition, a password generator allows you to create strong, customizable passwords
by selecting character sets such as uppercase, lowercase, numbers, and symbols, and adjusting the desired length.
All tools are designed for quick checks, drafts, and small code fragments.
All processing is performed locally in your browser.
No text, code, or generated data is sent to any server, ensuring privacy and safe everyday use.
Character Counter
Real-timeHTML Escape
HTML / XML Encode & Decode
CSS / JS Light Minify
Lightweight minification only. For production, use a dedicated build tool.
Password Generator
Strength estimate:
Line tools
Sort, de-duplicate, number, join or count lines. Runs in your browser.
Slug generator
GuideHow to use & features
- Type into the main text area to see live counts for characters, lines, and more.
- Use Escape/Unescape, entity conversion, or quick minify buttons for HTML and code snippets.
- In the password section, set the length and character types, click Generate, and copy the result.
- All inputs and outputs stay on your device; nothing is uploaded.
FAQFAQ
What does the character count measure?
"Characters" is the JavaScript string length (UTF-16 units), so some characters such as emoji count as 2. "Bytes" is the size in UTF-8; a Japanese character is normally 3 bytes.How are words counted?
As runs of text separated by whitespace (spaces, tabs, newlines). Text that is not separated by spaces, such as Japanese, counts as a single word.Which characters does HTML escape convert?
The five characters `&`, `<`, `>`, `"` and `'`, converted to `&`, `<`, `>`, `"` and `'`. Unescape reverses only these five.What is the difference between HTML and XML entity encoding?
The same five characters are converted, but `'` becomes `'` in HTML and `'` in XML. Choose XML when embedding in an XML configuration file.How far does minify go?
It removes comments and extra whitespace and line breaks. It does not shorten variable names or rewrite expressions. For production builds use a dedicated tool such as terser or cssnano.Is my text sent anywhere?
No. Counting and conversion all happen in your browser.
Use casesCommon use cases
Checking character and byte limits
Confirm that input with a limit, such as social posts, meta descriptions or database columns, fits within it.Escaping HTML before pasting it as a code sample
When writing tag-containing code in an article or README, escape `<` and `&` so it displays as written.Embedding values safely in XML or HTML
Convert special characters to entities before putting a string in a config file or an HTML attribute, so the syntax is not broken.Slimming small CSS and JS snippets
Strip comments and whitespace to shorten bookmarklets and inline CSS or JS.
NotesNotes & limitations
Minify is simple text replacement
A `//` inside a string or regular expression (for example `"http://example.com"`) or runs of spaces in a string cannot be told apart from comments or padding and may be broken. Code that relies on automatic semicolon insertion can also stop working. Always test the result.Unescape reverses only the basic five
It restores `&`, `<`, `>`, `"` and `'` only. Entities such as ` `, `'` and `©` are left as they are.The count can differ from what you see
Emoji and characters with combining marks or variation selectors can count as more than one. The word count is also unreliable for languages that do not use spaces.Do not reuse a generated password for something important
The password generator uses the browser's cryptographic random numbers, but the result is shown on screen, so handle it with care and do not paste it into shared places such as chat.
AboutAbout this tool
Text Utilities and Character Counter
This text utilities tool collects small but frequent text tasks in one place: counting characters and lines, cleaning whitespace, escaping HTML, and preparing text for documentation, forms, code snippets, or content workflows.
When it helps
- Check character limits: Review lengths for meta descriptions, social posts, ads, and form fields.
- Prepare safe snippets: Escape HTML before displaying code or text in documentation.
- Clean up text: Remove extra spaces, normalize line breaks, and inspect line counts.
Keep the original text
Some transformations are difficult to reverse once they have been applied multiple times. When editing important text or code snippets, keep the original nearby before running cleanup, escaping, or replacement operations.
Articles for this tool
How to Count Characters and Clean Text for Docs, Forms, and Code Snippets
Use character counts, line counts, whitespace cleanup, and HTML escaping to prepare text for documentation, metadata, forms, and development workflows.
Practical Regex Recipes: Copy-Paste Search and Replace Patterns
Ready-to-use regular expressions for emails, URLs, dates, whitespace cleanup, and more—each with what it matches—plus everyday text-processing tips.
Drastically Simplify Markdown Table Creation! Visual Editor Techniques
Writing Markdown tables by hand is a chore. Learn how a visual editor makes creating and editing tables intuitive and speeds up your documentation.
Unified Diff Format Reference: Reading @@ Hunks in git diff Output
How to read git's unified diff: what @@ -12,7 +12,9 @@ means, why a one-character edit shows as a whole-line replacement, and whitespace and line-ending traps.
