ExampleAddress

What Is the Fragment in a URL?

A fragment is the part after # in a URL. It commonly identifies a section of a document or carries state interpreted by a browser application.

Examples at a glance

https://example.com/guide/#address-format

Page address

URL without fragment
https://example.com/guide/

The page requested from the server.

Section identifier

Fragment
address-format

Begins after #; a page can use it to identify a section.

The hash is a separator

In this example address-format is the fragment identifier and # marks its start. A page can link that fragment to an element with a corresponding id.

Fragments and requests

The fragment is not included in an HTTP request target. Client-side scripts can still read it, and application behavior varies; a fragment is not a secure place to hide a secret.

Related guides and tools

Primary sources