dev

Percent-Encoding and Query Strings Explained: A Beginner-Friendly Explainer

Percent-Encoding and Query Strings Explained in plain English: key terms, how it works behind the scenes, and how to troubleshoot common problems.

2026-10-11 · 3 min read

Ever wondered what actually happens when you use a URL encoder? Here are the concepts behind it, explained simply, with practical tips.

The basics

URL encoding (percent-encoding) replaces characters that are unsafe or reserved in URLs with % followed by their hex code — a space becomes %20, & becomes %26.

URLs may only contain a limited set of characters. Encoding turns other characters, including non-English letters (as UTF-8 bytes), into %XX sequences. Decoding reverses it so humans can read the link.

Key takeaways

  • URL encoding (percent-encoding) replaces characters that are unsafe or reserved in URLs with % followed by their hex code — a space becomes %20, & becomes %26.
  • URLs may only contain a limited set of characters.
  • Non-English characters are encoded as UTF-8 bytes.

Why it matters

  • Build links that never break.
  • Read encoded tracking and redirect URLs.
  • Pass special characters safely in query parameters.
  • Debug API requests.

Key terms you should know

Percent-encoding

Representing characters as % followed by two hex digits.

Query string

The part of a URL after ?, made of key=value pairs.

Reserved characters

Characters with special meaning in URLs, like ?, &, = and /.

UTM parameters

Tracking tags like utm_source used in marketing links.

Common questions when things go wrong

"URI malformed" error when decoding. The string contains an incomplete % sequence. Check for stray % signs.

The link no longer works after encoding. You encoded the whole URL — encode only the parameter values.

%2520 appears. The value was encoded twice. Decode once.

Plus signs became spaces. Form encoding treats + as a space; encode + as %2B.

Example: how it works in practice

Support teams: Read encoded error links from users.

In practice that means: paste text or a URL, then choose encode or decode, then review — and the job is done in a couple of minutes.

Phone, tablet or laptop?

Phone and tablet: It works on mobile for emergencies, but a desktop browser is more comfortable for long strings and code.

Laptop and desktop: On a desktop, keep it open next to your editor or API client so you can paste, inspect and iterate quickly.

Either way, the URL Encoder/Decoder runs inside your browser — there is nothing to install and no account to create.

Putting it into practice

Now that you know the concepts, follow How to Encode and Decode URLs Online for Free: Step-by-Step Guide or compare options in Online URL Encoder vs Manual Encoding: Which Should You Use?.

Try it now

You can do everything in this guide with the URL Encoder/Decoder. It is free, private and finishes in seconds.

Frequently asked questions

Does it support non-English text?

Yes, as UTF-8.

Is my data stored?

No.

What is the difference between URL encoding and Base64?

URL encoding makes text URL-safe; Base64 represents binary data as text.

Why decode a link?

To see its real destination and parameters.

What is %20?

The encoded form of a space.

Keep learning

Related free tools: Base64 Encode/Decode · Slug Generator · JWT Decoder

Try the URL Encoder/Decoder

Encode or decode URLs and query parameters instantly

Open URL Encoder/Decoder

Related guides

Browse all guides · PDF AI Converter Editor Android app