URL Encode & Decode
Percent-encode text for URLs and decode it back, both directions.
Direction
Converted live as you type. Nothing leaves your browser.
Percent-encoding reference
Unreserved characters (A to Z, a to z, 0 to 9, and - _ . ~) are never encoded. The reserved and unsafe characters above are converted to their percent codes in a query value.
How to URL encode or decode text online
Choose a direction
Select Encode to percent-encode plain text or Decode to turn percent sequences back into characters.
Set the scope when encoding
By default, reserved characters like /, ?, and & are escaped so the text works as a single query value. Toggle Whole URL to keep a full address structurally intact.
Enter your text
Typing or pasting updates the result immediately; there is no submit step.
Copy the output
Use Copy to clipboard to move the encoded or decoded string where it is needed.
Why use this tool
Component and whole-URL modes
By default, individual values are fully escaped for use in a query string. The Whole URL toggle switches to a lighter encoding that leaves :, /, ?, and & in place.
Decodes both kinds
Decoding reverses output from either encode mode in a single pass, so you never need to know which mode produced a string.
Multi-byte characters handled
Percent-encoding operates on UTF-8 bytes, so an emoji becomes its full multi-byte percent sequence and comes back intact.
Bad sequences caught
A stray % or a truncated escape like %A produces an inline error message instead of a broken result.
Live in both directions
The output tracks the input on every keystroke, in encode and decode mode alike.
Query strings stay private
URLs often embed tokens and personal data; here they are processed entirely on the page and never reach a server.
About this tool
This URL encoder percent-encodes text as a single component by default, encodes a complete address when the Whole URL toggle is active, and turns percent sequences back into characters in the other direction. The distinction matters: component encoding escapes reserved characters such as /, ?, &, and =, which is what a single query-string value needs, while whole-URL encoding leaves that structure alone so a complete address remains a working link.
Percent-encoding comes up whenever text meets a URL: building query strings by hand while testing an API, escaping a redirect target or callback URL before nesting it inside another URL, making a search phrase with spaces and punctuation safe for an href, or decoding a tracking-laden address to see what it actually contains. The malformed-sequence error also makes this a quick way to find the truncated escape that breaks a pasted link.
Strings are processed on your device only, worth knowing since real-world URLs regularly carry session tokens and email addresses. Percent-encoding is for URL safety, not for binary data; when arbitrary bytes need to become printable text, Base64 encode and decode is the right tool. To turn a headline into a clean lowercase URL path rather than escape it, use slugify, and a finished link can go straight into the QR code generator.
Frequently asked questions
- What is URL encoding?
- URL encoding, also called percent-encoding, replaces characters that are unsafe or reserved in a URL with a percent sign followed by their hex byte value, like a space becoming %20. It lets you safely put arbitrary text into query strings, paths, and form data.
- What is the difference between the two encode modes?
- Component mode escapes reserved characters like /, ?, &, and = so the text is safe as a single query value or path segment. Whole URL mode leaves those structural characters intact so an entire address stays valid. Decoding reverses both in a single pass.
- How do I use it?
- Choose Encode or Decode, then type or paste your text. The result updates live and the copy button copies it to your clipboard. Encoding uses UTF-8, so accents and emoji are escaped and restored correctly.
- What happens with invalid input when decoding?
- If the input contains a malformed percent sequence, such as a lone % or an incomplete %A, the tool shows an inline error instead of crashing so you can fix the string. Empty input simply shows nothing.
- Is my text uploaded anywhere?
- No. Encoding and decoding run entirely in your browser. Your text never leaves your device, is never sent to a server, and is not stored or logged.
Related tools
Slug Generator
Turn any title or phrase into a clean, URL-friendly slug for permalinks, paths, and filenames.
QR Code Generator
Turn a URL, WiFi login, contact card, email, or map location into a scannable QR code and download it as a PNG or SVG.
API Key Generator
Generate cryptographically random API keys and tokens in hex, base62, or base64url, with control over length, an optional prefix, and bulk output.
ASCII Table Reference
The full ASCII character set with decimal, hex, octal, binary, and HTML codes. Search by code, character, or name.
Atbash Cipher
Mirror the alphabet so A swaps with Z, B with Y, and so on. Atbash is its own inverse, so one field both encodes and decodes as you type.
Base32 Encoder and Decoder
Encode text to standard Base32 and decode Base32 back to text, following RFC 4648.