Skip to content

Slug vs title vs id

The title is for humans and keeps accents, the slug is for URLs and strips them, the ID is for machines and is opaque.

Aspect

Title

Slug

ID

Audience

Human readers

URLs, search engines

Databases

Accents allowed

Yes

No

N/A

Spaces allowed

Yes

No

N/A

Readable

Yes

Yes, if well done

No

Stable

No, can change

Yes, ideally immutable

Yes

Primary use

Display

URL path

Foreign keys