I've been starting to make use of Gmail's nested labels, mostly so it's easy to organize my label list that has 100 or more labels in it. But now the label tags are getting really long, making for a cluttered display and often hiding most of the actual subject line. I rarely want to see any of the parent label names in the tag.

So for example, I'm seeing:


when all I want to see is:


Is there any way to hide this in Gmail? An add-on perhaps?

2 Answers 2


There is not a native Gmail setting to shorten nested label names, although Gmail will automatically shorten label names if needed:


However, there is a Greasemonkey script that will do exactly what you want:


  • This is a good tip, thanks, however Greasemonkey appears to be Firefox only. I'm looking for something like a Gmail plug-in at this point, or at least something I could use in Chrome.
    – David Korn
    Commented Oct 15, 2012 at 18:48
  • 1
    userscripts-mirror.org/scripts/show/149052 working like a charm with tampermonkey Commented Feb 21, 2016 at 0:17

Today, in 2018, the script still works like a charm, but you have to make a little change to make it work.

Tampermonkey complained that there was no { after the IF statement, so the script now looks like:

    **// ==UserScript==
// @name        Short Labels
// @namespace   http://fluidapp.com
// @description Shortens Gmail hierarchical labels to the last part of the path
// @include       http://mail.google.com/*
// @include       https://mail.google.com/*
// @author      Scott Whittaker, Billy Gallagher
// ==/UserScript==

(function () {
    function shorten_labels() {
        // make sure we are targeting the canvas frame
        //var canvas = document.getElementById('canvas_frame').contentDocument;
        // get the labels
        var labels = document.getElementsByClassName('av');
        for (var i in labels) {
            if (!(!isNaN(parseFloat(i)) && isFinite(i))){
            var label = labels[i];
            var shortLabel = label.innerHTML.split('/').pop();
            label.innerHTML = shortLabel;

    window.setInterval(shorten_labels, 5000);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.