By spec, '#' characters in data URIs should not be treated as part of the URI body, and should instead only mark the start of the URI fragment component. Historically Chrome has not adhered to the spec, instead treating '#' characters as both fragment-starters and part of the body.



Specification link

Final published standard: Recommendation, Living Standard, Candidate Recommendation, or similar final form

Status in Chromium


Removed (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.



This can be seen by visiting the following URL: data:text/html,<div style="height:2000px"></div><a id="foo">bar</a>#foo In a spec-compliant browser, this will render the text 'bar' at the bottom of the page, and scroll to it. In Chrome this URL will both render the text 'bar#foo' and still scroll to it! Violating the spec has caused web-compat problems; a common pattern is web-developers writing inline SVG data in a CSS url(), such as the following: content: url('data:image/svg+xml;utf8,<svg

Search tags

data, url, pound, fragment,

Last updated on 2021-12-13