What URL Encoder/Decoder helps you do
Percent-encode a string for use inside a URL component, or decode an encoded string back to readable text. It uses JavaScript's encodeURIComponent and decodeURIComponent, so reserved characters such as slashes and colons are encoded too. That makes it right for a query value or path segment, not for a whole URL.
Encoding and decoding run in your browser; your strings are not uploaded.
How it works
These tools transform text locally: they parse, format, encode or render a string in your browser. Nothing you paste is uploaded to Haivix, but some tools load a library from a public CDN, so the page needs a network connection and your browser makes that request. The transformations operate on syntax, not meaning: a formatter can make invalid code look tidy, an encoder can hide a value without protecting it, and a preview can render markup that was never meant to execute. Outputs are exact strings, which means line endings, byte order marks and character encoding all matter when you paste the result somewhere else.
How to use URL Encoder/Decoder
- Paste the string to encode, or an encoded string to decode.
- Choose the encode or decode direction.
- Check what happened to spaces, slashes and ampersands.
- Copy the result into your URL or script.
When to use it
- Encode a query parameter that contains spaces or symbols.
- Read a percent-encoded URL from a log or redirect.
- Prepare a value for use in a link.
- Encode a filename for a URL path segment.
- Decode a value copied from a tracking parameter.
- Check what a plus sign or percent sequence actually represents.
When not to use it
- Do not paste a full URL and expect the scheme and slashes to stay readable.
- Do not use it as an HTML encoder or a JSON escaper.
- Do not use it to sanitize untrusted input for SQL or shell commands.
Example
A space becomes %20 when encoded, and %20 decodes back to a space. A full URL such as https://example.com/a b encodes its colon and slashes as well, so it is no longer usable as a URL. A plus sign is not converted to a space by this tool; that convention belongs to form encoding.
What you can do with URL Encoder/Decoder
- Encode a string with encodeURIComponent.
- Decode percent-encoded input.
- Encode spaces as %20.
- Encode reserved characters such as and, equals and slash.
- Report invalid encoded input instead of returning a partial result.
- Copy the output.
Example: test with a real sample before trusting the output
Keep the original text. These tools produce a new value rather than editing in place, so a bad transform is reversible only if you still have the source.
Test with a representative sample, including the awkward case: a quote inside a string, a tag inside an attribute, a newline in the middle of a value.
Check line endings and encoding when moving between Windows, Unix and a browser form. A trailing carriage return can break a signature or a hash.
Treat pasted HTML and Markdown as untrusted. A preview that renders raw markup can execute event handlers even when it looks harmless.
Verify the result with the real parser, compiler or linter before shipping. A browser-side formatter is a convenience, not a substitute for the toolchain.
Prefer exact values over screenshots or copied rendered text. Rendering can normalize quotes, dashes and spaces in ways that break the next tool in the chain.
What to know before you start
- It applies component encoding, not full-URL normalization.
- Double-encoded strings may need decoding more than once.
- It does not convert plus signs to spaces or handle application/x-www-form-urlencoded.
- It does not normalize Unicode or validate that the result is a working URL.
- It is not a sanitizer for untrusted input.
Common mistakes
- Encoding the whole URL instead of one component.
- Expecting plus to mean space.
- Decoding twice and turning an encoded percent into a character.
- Using the output as an HTML-safe string.
Troubleshooting
If decoding reports an error, a percent sign may not be followed by two hex digits.
If the result still contains percent sequences, the input may be double-encoded.
If slashes disappeared, that is expected for component encoding.
If a space became a plus elsewhere, that system used form encoding, not this tool.
Related standards and documentation
- ECMA-404 defines JSON, and RFC 8259 defines its media type.
- XML 1.0 is a W3C Recommendation; schemas are defined separately by XSD.
- ECMA-262 defines JavaScript, including its regular expression syntax.
- RFC 3986 defines URI syntax and percent-encoding.
- CommonMark specifies Markdown, though many renderers extend it.
- The HTML Living Standard defines character references and parsing rules.
- Unicode defines the character encodings behind text and entity handling.
- Keep the source.
- Test the awkward case.
- Check encoding and newlines.
- Verify with the real tool.