Nanoslug plugin for Craft CMS 3.x. Uses nanoid to generate a secure slug on entry save.
Switch branches/tags
Clone or download
Cory Zibell
Latest commit b43e257 Oct 10, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Clean it up and clean it out 🏃 Oct 9, 2018
.craftplugin Renames and changes Oct 9, 2018
.gitignore init Sep 17, 2018 1.0.3 - Version normalization Oct 9, 2018 Find and replace all the things Oct 9, 2018 1.0.1 - Fixed readme, added changelog Oct 9, 2018
composer.json 1.0.3 - Version normalization Oct 9, 2018

Nanoslugs for Craft CMS 3.x

Nanoslugs is a Craft plugin that sets the slug of a new entry to be a nanoid.

This plugin copies heavily from Madhouses's Slugger plugin that does something very similar using a different library. Thanks, Madhouse. 😃 Their plugin copies heavily from Alec Ritson's Slugged plugin for Craft 2. Thanks, Alec. 😃 (The section override works in this version btw.)


This plugin requires Craft CMS 3.0.0 or later.


Visit the Plugin Store in your Craft 3 control panel and install from there. Nanoslugs costs nothing. Visit the Plugin Store in your Craft 3 control panel. It costs nothing.


  1. Open your terminal and go to your Craft project:

     cd /path/to/project
  2. Then tell Composer to load the plugin:

     composer require coryzibell/nanoslugs
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Nanoslugs.


All configuration is done in the plugin settings page in the admin area.

Plugin settings

Default length The length of the hash, this will be overwritten with any length defined for a section

Default: 8

Alphabet The characters to use when generating the slug.

Default: 0123456789abcdefghijklmnopqrstuvwxyz-

Sections The only sections that will be listed are editable sections (no singles obvs). If you add a length to a section this will override the default set above. A section must be enabled for the hashing to happen, regardless of whether you add a length override or not.

Using Nanoslugs

Enable your section in the settings. Make a new entry. Save it. Voila... cryptographically secure slug.

Support, issues, feedback

If you experience any problems please create a new issue here on the repo.