URL Encoder & Decoder
Encode or decode URLs, query parameters, and special characters instantly — paste your text, choose a mode, and see the result update live.
- Input Characters
- 0
- Output Characters
- 0
CleanTextly's URL Encoder & Decoder converts text and URLs to and from percent-encoded (URL-safe) format entirely in your browser. Encode a query parameter with encodeURIComponent, encode a full link while keeping its structure intact with encodeURI, or decode an already-encoded string back to readable text — all instantly, with nothing uploaded to a server.
Features
Encode URI Component
Escapes every reserved character — including &, =, ?, and / — so it's safe to use inside a query string or URL segment, e.g. "hello world" becomes "hello%20world".
Encode Full URI
Leaves URL-structure characters like :, /, ?, #, &, and = untouched while still escaping spaces and other unsafe characters, so a complete URL stays valid after encoding.
Decode Either Format
Reverses percent-encoded text back to its original characters, matching whichever encoding type — URI or URI Component — was used to encode it.
Unicode & Emoji Safe
Encodes and decodes multi-byte Unicode characters and emoji correctly, since encoding operates on UTF-8 byte sequences.
Clear Error Messages
If the input contains an invalid percent-encoded sequence, the tool shows a clear error message instead of crashing or silently producing garbage output.
How to Use
- 1
Paste your text or URL
Add the text, URL, or query string you want to encode or decode into the Input box.
- 2
Choose Encode or Decode
Select Encode to percent-encode your input, or Decode to convert an already-encoded string back to plain text.
- 3
Pick an encoding type
Choose URI Component for query parameters or arbitrary text, or Full URI to keep a complete URL's structure intact.
- 4
Copy, swap, or download
Copy the result to your clipboard, use Swap to reverse the operation, or download it as a .txt file.
Example
Encoding a Query Parameter
Input
hello world
Output
hello%20world
Common Use Cases
Building Query Strings
Encode parameter values before appending them to a URL, so spaces and special characters don't break the link.
Debugging URLs
Decode a percent-encoded URL to see exactly what data it contains.
API Requests
Prepare user input for safe inclusion in API request URLs.
Sharing Links
Encode text containing spaces or symbols before sharing it as part of a link.
Frequently Asked Questions
URL encoding (percent-encoding) replaces characters that aren't allowed in a URL — like spaces or & — with a % followed by their hex code, so text can be safely included in a URL.
encodeURI keeps URL-structure characters like :, /, ?, #, &, and = intact so a whole URL stays valid, while encodeURIComponent escapes those same characters too, since a single query value or piece of text shouldn't be interpreted as URL structure.
Use URI Component when encoding a single query parameter, form value, or arbitrary text. Use Full URI only when encoding an entire, already-structured URL.
Decoding fails if the input contains a % that isn't followed by a valid two-digit hex code, or is missing part of a multi-byte Unicode sequence — that means the text isn't validly encoded.
Yes. Encoding and decoding operate on UTF-8 byte sequences, so emoji and non-Latin characters encode and decode correctly.
Yes. Like every tool on CleanTextly, it's completely free to use with no sign-up required.
No. All encoding and decoding happens entirely in your browser using JavaScript — nothing is sent to a server or stored.