URL Encoder / Decoder
Encode and decode URL-safe text.
Encode text for use inside URL parameters or decode percent-encoded text back into readable form. The tool uses encodeURIComponent and decodeURIComponent directly in the browser.
Tool area
Optional product discovery
You may also like
FunnyTools keeps its tools free to use.
If you are already shopping, these Amazon links may help support the site. We may earn from qualifying purchases at no extra cost to you.
How to use
- Paste text, a query value, or an encoded URL component into the input box.
- Press Encode to create URL-safe text.
- Press Decode to restore percent-encoded text.
- If decoding fails, check for incomplete percent sequences.
Use cases
- Encode search keywords before adding them to a query string.
- Read encoded values inside tracking URLs.
- Prepare API test parameters that contain spaces or CJK text.
Content and verification review:
How to verify a URL Encoder / Decoder result before relying on it
This section covers why URL Encoder/Decoder encodes structural URL characters that some other encoders leave alone, and the difference between its two error messages.
Encode a full URL and see every structural character escaped
Type “https://example.com?id=1&name=A B” and click Encode: the colon, both slashes, the question mark, the equals signs, and the ampersand are all converted to percent-codes, along with the space (which becomes %20) — the output is not a clickable link, because this tool uses encodeURIComponent, meant for encoding a single value inserted into a URL, not for encoding an entire URL while preserving its structure.
Use this for one query parameter’s value, not for a whole URL you plan to paste into a browser
To safely insert a value like “50% off & free shipping” into a query string, encode just that value with this tool and then build the full URL yourself around the encoded result. Encoding the entire URL string at once, including its own “https://” and “?” and “&” characters, breaks the URL’s structure rather than preserving it — a common mistake this tool’s output will not catch for you.
Decode failures and encode failures show different error messages for different reasons
Decode fails and shows an error whenever the pasted text contains an incomplete or malformed percent-sequence — a lone “%” or “%2” with no second hex digit, for instance. Encode almost never fails, but it can, specifically when the input contains a broken surrogate-pair character (which can happen from a corrupted copy-paste of certain emoji or rare symbols); the two error messages look similar but come from genuinely different causes, so check which button you actually clicked before assuming you know why it failed.
Acceptance checklist
- This tool is used to encode a single parameter value, not an entire URL — encoding a whole URL string also escapes its own structural characters like : / ? and &.
- A round trip (Encode, then Decode the result) has been checked to confirm text containing spaces or non-ASCII characters returns unchanged.
- Pasted content has been checked for incomplete percent-sequences before decoding, since a lone “%” or a broken hex pair triggers a decode-specific error.
- Which button was actually clicked (Encode vs. Decode) has been confirmed before troubleshooting an error message, since the two failure modes have different causes.
Who is it for
- Developers building query strings and API requests
- QA teams testing URLs containing spaces, Unicode, and symbols
- Students learning percent-encoding rules
Real examples
Encode one query parameter safely
Encode the parameter value as a component, then let application code assemble the key, equals sign, and ampersand. Encoding an entire URL as one component also escapes slashes, the scheme colon, and query separators.
Diagnose double encoding
A `%25` sequence can indicate that a percent sign was encoded again. Trace which systems touched the value before decoding multiple times, and never insert decoded untrusted content directly into HTML.
Good to know
- Component encoding and complete-URL handling solve different problems; choose based on where the value will be inserted.
- URL encoding is not input validation and does not by itself prevent open redirects, XSS, or injection.
- A plus sign can mean a space in form encoding but may remain a literal plus in a URI component.
FAQ
- Does this encode a full URL?
- It uses encodeURIComponent, which is best for individual query values or path fragments rather than an entire URL.
- Why did decoding fail?
- A percent sign may be missing two hexadecimal characters, or the text may not be valid URI encoding.
- How are spaces encoded?
- encodeURIComponent encodes spaces as %20, not as plus signs.
Privacy & local processing
🔒 This tool runs entirely in your browser. No data is uploaded to any server.
This tool runs mainly in your browser. The content you enter is not sent to FunnyTools servers.
Trust & usage note
This tool runs mainly in your browser. Your input is not actively uploaded to a server. Avoid entering highly sensitive data. Results are for reference only.
Last updated:
Get updates
New tools and practical tips, straight to your inbox. No spam, unsubscribe anytime.