# You can use newline characters in URLs

DevFeed: [You can use newline characters in URLs](<https://devfeed.tech/articles/you-can-use-newline-characters-in-urls-29393.md>)

Original publisher: [Read original article](<https://lemire.me/blog/2026/02/28/you-can-use-newline-characters-in-urls/>)

Author: Daniel Lemire

Published: 2026-02-28T19:21:39Z

Content type: tutorial

Language: en

Sources: [Daniel Lemire](<https://devfeed.tech/sources/daniel-lemire.md>)

Topics: [Web](<https://devfeed.tech/topics/web.md>), [browsers](<https://devfeed.tech/topics/browsers.md>), [HTML](<https://devfeed.tech/topics/html.md>), [SVG](<https://devfeed.tech/topics/svg.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [ascii](<https://devfeed.tech/tags/ascii.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [code](<https://devfeed.tech/tags/code.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [html](<https://devfeed.tech/tags/html.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [svg](<https://devfeed.tech/tags/svg.md>), [web](<https://devfeed.tech/tags/web.md>), [xml](<https://devfeed.tech/tags/xml.md>)

## AI overview

This article explains that HTML URLs can contain newline and tab characters in practice because the URL parser reports a validation error but removes those characters and continues. It also describes how ASCII whitespace is handled in data URLs, including base64-encoded PNG and SVG images.

## Source excerpt

We locate web content using special addresses called URLs. We are all familiar with addresses like https://google.com. Sometimes, URLs can get long and they can become difficult to read. Thus, we might be tempted to format them like so in HTML using newline and tab characters, like so: <a href="https://lemire.me/blog/2026/02/21/ how-fast-do-browsers-correct-utf-16-strings/">my blog post</a> It will ... Continue reading You can use newline characters in URLs