Web & Publishing · PRACTICAL GUIDE
URL encoding, repeated parameters and tracking fields
Work through URL components, encoding layers, campaign values and conservative cleanup.
Structure and values need different handling
https://example.com/search?q=green+tea&tag=a&tag=b#results
The path is /search, q is a query key, and results is the fragment. The two tag entries are separate ordered pairs. Collapsing them into a plain object can lose one value. URL parser keeps both and never visits the destination.
In form-style query decoding, + becomes space. A literal plus should be %2B. In component mode, an unescaped + stays a plus.
Decode one layer at a time
%2520 decodes to %20 in one pass, not directly to a space. Decide whether a second layer belongs to your data before applying another pass. Invalid percent bytes should be corrected at the source, not silently replaced.
HTML entities are a different layer: & represents an ampersand in markup. Base64 is another representation altogether, mapping bytes to an ASCII alphabet. Base64URL changes two alphabet characters for URL contexts. None of these operations verify authenticity or provide encryption.
Keep campaign naming consistent
A UTM builder adds source, medium and campaign values through a URL-aware serializer. Agree on spelling and capitalization before sharing many links. The builder preserves unrelated parameters and fragments, and reports existing UTM fields that were replaced. It cannot guarantee that analytics software records a visit.
Clean only what you understand
URL cleaner removes only the selected known tracking names. It preserves unknown parameter pairs because they may select content. Deleting page=2 or q=green+tea changes the destination’s meaning.
A signed URL may depend on every original byte, so any change can invalidate it. Browser URL parsing can normalize host/path spelling even when query pairs are preserved. Check the destination yourself before sharing and do not treat a cleaned link as a safety verdict.
A campaign hygiene checklist
Before a campaign ships: naming sheet agreed (lowercase, fixed medium list); every live link built through the UTM builder; parameter table pasted into the campaign doc; sample link opened and confirmed in the destination’s analytics preview if available; short links (if any) redirected to the full tagged URL rather than replacing it; clean versions prepared for print or QR codes where tags cannot travel.
After the campaign: pull a report grouped by source/medium/campaign; note which fields were actually populated; fix the naming sheet for the next round; use URL Cleaner when sharing archived links externally.
Encoding layers in one table
Percent-encoding (%20, %C3%A9) represents UTF-8 bytes inside URL components. HTML entities (&, é) represent characters inside markup. Base64 (SGVsbG8=) represents arbitrary bytes as ASCII. Unicode escapes (\u00e9, U+00E9) represent code points in source or inspection tools. Decode exactly one layer at a time, identify the source of each layer, and stop when the result matches the representation the next system expects.
Double-encoded values (%2520 → %20 → space) are common in logs and API responses. Do not decode “until it looks right”—decode once, inspect, decide consciously.
When not to clean or rebuild a URL
Do not modify signed or expiring URLs (payment links, document shares, presigned S3 URLs)—any query change can invalidate the signature. Do not strip parameters you do not recognise; they may select content. Do not rebuild a URL by hand when it has repeated keys or encoded fragments—use the parser and builder. Do not treat a cleaned link as a safety verdict; destination safety is a separate question.
When sharing internally, keep the full original URL in the ticket and note which fields were removed if you also share a cleaned version. That prevents an argument about what changed.
Put it into practice
Choose the tool that matches your next step. Keep an original copy and inspect the result before using it elsewhere.
URL and query-string parserInspect components and repeated parameters.Web & PublishingURL encoder and decoderEncode a component or read escaped data.Web & PublishingUTM campaign URL builderCreate consistently tagged campaign links.Web & PublishingURL tracking parameter cleanerRemove selected tracking fields before sharing.Web & PublishingURL slug generatorPrepare readable page or file identifiers.Web & PublishingBase64 encoder and decoderConvert text to or from Base64 representation.Web & PublishingHTML entity encoder and decoderEscape markup as text or read encoded characters.Web & Publishing