Need help with slugify?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

127 Stars 3 Forks MIT License 24 Commits 0 Opened issues


Extremely small library that creates slugs for strings

Services available


Need anything else?

Contributors list


Twitter GoDoc Build Status

Slugify is a small library that turns strings in to slugs.


Slugify is licensed under a MIT license.


A simple

go get
should suffice.



package main

import ( "fmt"



func main() { fmt.Println(slugify.Slugify("Hello, world!")) // Will print: hello-world fmt.Println(slugify.Slugify("💻 I love this computer! 💻 ")) // Will print: i-love-this-computer

dotSlugifier := slugify.New(slugify.Configuration{
    ReplaceCharacter: '.',

fmt.Println(dotSlugifier.Slugify("Hello, world!")) // Will print:

numericOnlySlugifier := slugify.New(slugify.Configuration{
    IsValidCharacterChecker: func(c rune) bool {
        if c >= '0' && c <= '9' {
            return true

        return false

fmt.Println(numericOnlySlugifier.Slugify("3 eggs, 2 spoons of milk")) // Will print: 3-2

replacementMapSlugifier := slugify.New(slugify.Configuration{
    ReplacementMap: map[rune]string{
        'a': "hello",
        'b': "hi",

fmt.Println(replacementMapSlugifier.Slugify("a b")) // Will print: hello-hi


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.