About URL Encoder/Decoder — Percent-Encoding for URLs & Query Strings

Unencoded ampersands in a query parameter split one parameter into two. Unencoded hash characters truncate the query string at the fragment boundary. Spaces break mailto links across email clients. URL percent-encoding converts these problematic characters into safe %XX sequences that survive HTTP transmission intact. This tool handles both encoding and decoding, follows RFC 3986 for correct reserved character handling, uses %20 for spaces (not the plus-sign convention that only applies to form data), and processes multiple lines at once for batch URL work.

How to Use This Tool

Follow these simple steps to get accurate results in seconds. The whole process takes less than a minute for most inputs.

  1. 1

    Paste Your URL or Text

    Enter the URL or text string you want to encode, or the percent-encoded string you want to decode.

  2. 2

    Click Encode or Decode

    Press the encode button to convert special characters to percent format, or the decode button to reverse the process.

  3. 3

    Review the Result

    The converted text appears instantly in the output area. Verify that the encoding or decoding is correct.

  4. 4

    Copy and Use

    Click the copy button to grab the result for use in your HTML, API requests, or configuration files.

How It Works

The technical details of how this tool processes your input and produces accurate results.

RFC 3986 Character Classification

The encoder classifies each character in your input according to RFC 3986: unreserved characters (A-Z, a-z, 0-9, - . _ ~) pass through unchanged, while all other characters are encoded. This ensures that structural URL characters like slashes and colons in the path remain intact when you encode only the parameter values.

UTF-8 Byte Sequencing for Unicode

Unicode characters are encoded as sequences of percent-encoded UTF-8 bytes. The euro sign (€) is represented in UTF-8 as three bytes (0xE2, 0x82, 0xAC), which become %E2%82%AC in the encoded output. This preserves internationalized text through systems that only process ASCII characters.

Decoding with Percent Pair Resolution

The decoder scans for percent signs followed by two hexadecimal digits, converts each pair to its byte value, and assembles the resulting bytes into a UTF-8 string. Invalid percent sequences (like %GG or a lone % at the end of the string) are left unchanged in the output to preserve data integrity.

Key Features

Built to handle real workflows quickly and accurately. Each feature solves a specific problem you'd otherwise need multiple tools or manual steps to address.

Bidirectional Encoding/Decoding

Convert plain text to percent-encoded format or decode percent-encoded strings back to readable text with a single click.

RFC 3986 Compliant

Follows the standard URI encoding specification, encoding all reserved characters while preserving unreserved characters like letters, digits, hyphens, and periods.

Standard %20 Space Encoding

Uses %20 for spaces rather than the plus-sign convention, which is correct for URLs and path segments and universally safe across all URL contexts.

Batch Processing

Encode or decode multiple lines of text at once, useful for processing lists of URLs or query parameter values.

Real-Time Preview

See the encoded or decoded result update instantly as you type, allowing you to verify correctness before copying.

Benefits of Using URL Encoder/Decoder — Percent-Encoding for URLs & Query Strings

Why this tool matters and how it improves your daily work.

RFC 3986 Compliance Prevents Silent Data Loss

An unencoded ampersand in a parameter value like name=Ben&Jerry splits into two separate parameters: name=Ben and Jerry=. RFC 3986 encoding converts that ampersand to %26 so the server receives the intended single value.

%20 for Spaces Works in Every URL Context

The plus-sign convention for spaces only works in application/x-www-form-urlencoded form submissions. Using + in a URL path or query parameter causes failures in many contexts. The %20 encoding is universally correct and safe.

Batch Processing Handles Lists of URLs

Paste 50 redirect URLs that need encoding for an OAuth registration, and process them all at once instead of encoding each one individually. The batch mode applies the same encoding rules to every line.

Real-Time Preview Catches Errors Before Copying

See the encoded or decoded result update as you type. If the output looks wrong — like double-encoded percent signs — you catch it immediately rather than discovering the error after pasting the value into your code.

Common Use Cases

Real scenarios where this tool saves time and produces better results than manual methods.

Encode API Query Parameters

A user-generated search query containing spaces, ampersands, and special characters like café & bar must be percent-encoded before appending to an API endpoint, or the server will misparse the parameters.

Decode Analytics URLs

Analytics logs show URLs as search%3Fq%3Dcaf%C3%A9%26lang%3Den. Decode them to see the actual query parameters — search?q=café&lang=en — making reports readable without manually converting each percent-encoded sequence.

Prepare OAuth Redirect URIs

OAuth providers require redirect URIs with properly encoded special characters. An unencoded question mark or hash in the redirect URL causes authentication failures that are difficult to trace back to the encoding issue.

Encode Mailto Link Components

Subject lines and body text in mailto links must be percent-encoded. Spaces, line breaks, and special characters in unencoded mailto links break across most email clients.

Who Uses This Tool

Web Developers

encoding query string parameters that contain spaces, special characters, or user-generated content before appending them to API endpoints or redirect URLs to prevent malformed requests

SEO Specialists

decoding percent-encoded URLs from analytics and log files to see the actual keywords and paths users searched for, making reports more readable and actionable

QA Testers

encoding test data with special characters like emojis, CJK characters, or accented letters to verify that their application correctly handles internationalized URLs and form submissions

Pro Tips

Practical advice to get the most out of this tool, based on how experienced users actually work with it.

1

Always encode user-supplied values before inserting them into URLs. Unencoded ampersands in parameter values can split a single parameter into two, and unencoded hash characters can truncate the query string at the fragment boundary.

2

When debugging URL issues, decode the full URL first to see what the server actually receives, then re-encode individual parameters to identify which one contains the problematic character causing the request to fail.

3

Use the encoder for mailto links that contain subject lines or body text with spaces and special characters. An unencoded mailto link with spaces will break in many email clients, while a percent-encoded version works reliably across all platforms.

Frequently Asked Questions

Quick answers to the most common questions about this tool. If your question isn't here, contact our support team.

What is the difference between URL encoding and URI encoding?
URL encoding and URI encoding refer to the same percent-encoding mechanism defined in RFC 3986. They convert characters outside the allowed set into percent-sign followed by two hexadecimal digits. The terms are used interchangeably, though URI is the broader specification that includes URLs and URNs.
Should I encode the entire URL or just the query parameters?
Encode only the query parameter values and path segments that contain special characters. The protocol prefix, domain name, and structural characters like slashes and question marks should not be encoded. Encoding the entire URL would break it by converting the protocol and domain into unresolvable text.
Does the tool encode spaces as %20 or as plus signs?
The tool uses the standard %20 encoding for spaces, which is correct for URLs and path segments. The plus-sign convention for spaces applies only to application/x-www-form-urlencoded data in HTML form submissions, not to general URL encoding. Using %20 is universally safe.
How does URL encoding handle Unicode and special characters?
Unicode characters are encoded as sequences of percent-encoded UTF-8 bytes. For example, the euro sign (€) becomes %E2%82%AC, and café becomes caf%C3%A9. This ensures internationalized text passes safely through systems that only process ASCII characters while preserving the original content when decoded.
When should I use URL encoding versus HTML entity encoding?
Use URL encoding when preparing data for inclusion in URLs — query parameters, path segments, and fragment identifiers. Use HTML entity encoding when preparing text for display in HTML documents where characters like angle brackets and ampersands need to be escaped to prevent rendering issues or XSS vulnerabilities.
What is double encoding and how do I avoid it?
Double encoding happens when already-encoded characters are encoded again, turning %20 into %2520. This breaks URL functionality. Always decode an existing URL before re-encoding it, and be aware that some web frameworks automatically encode parameters — encoding them again produces double-encoded output.
Is this URL encoder free to use online?
Yes. This URL encoder and decoder is completely free and runs in your browser. No signup or installation required. Paste your text, click encode or decode, and copy the result.
What is percent encoding and why is it needed?
Percent encoding (also called URL encoding) converts characters that have special meaning in URLs — like ?, &, #, = — into safe %XX sequences. Without percent encoding, these characters would be interpreted as URL structure rather than data values, causing malformed requests and broken links.

Share this tool

Spread the word on social media

https://toolmetry.pro/utility/url-encoder