Skip to main content
chromax
Known Participant
Feb 24, 2026 4:55 PM UTC
Answered

Rename and sort layers by AI

Please AI help us with one of the nastiest things in Photoshop history, the naming and sorting of layers in groups. 

One click and AI sorts and renames layers by its look. Doesn´t have to be perfect and a undo function should be available. But could help a lot. 

And/or V2: I can prompt a set of rules how to clean up my mess. (All buttons in group etc) 

    Srishti Bali
    Srishti BaliCorrect answer
    Community Manager
    Oct 16, 2026 8:00 AM UTC

    Hi all, 

     

    Layer Cleanup is available in Photoshop desktop version 27.6 and later. Check out this post for more details:

     

    Thanks, Srishti Bali | Community & Engagement Strategist, Digital Imaging | Adobe

    7 replies

    Srishti Bali
    Community Manager
    Srishti BaliCommunity ManagerCorrect answer
    Community Manager
    Oct 16, 2026 8:00 AM UTC

    Hi all, 

     

    Layer Cleanup is available in Photoshop desktop version 27.6 and later. Check out this post for more details:

     

    Translate
    Thanks, Srishti Bali | Community & Engagement Strategist, Digital Imaging | Adobe
    Inspiring
    Mar 12, 2026 11:33 PM UTC

    You can now auto‑name your layers using AI in the Photoshop Web Beta. No more “Layer 1 copy 27” chaos — the AI analyzes your content and assigns clear, meaningful names instantly.

     

     

    You can now simply run a command to auto‑name your layers, and the AI will label them based on the layer icons. No more guessing what’s what — the system reads the visual cues and assigns names.

     

     

    And the best part? You can then open the same file in desktop Photoshop and all your layers stay perfectly named. Total workflow win.

     

     

    Translate
    Stephen Marsh
    Community Expert
    Community Expert
    Mar 12, 2026 11:53 PM UTC

    Hey, that’s great! Looking forward to this being added to the desktop version so that round tripping isn’t required.

    Translate
    Inspiring
    Mar 12, 2026 11:56 PM UTC

    Hey, you can sync your file from Photoshop Web to desktop, and all the AI‑generated layer names carry over.

    Translate
    Stephen Marsh
    Community Expert
    Community Expert
    Feb 26, 2026 10:24 AM UTC

    Not renaming using AI, and not sorting layers into groups… But it may help someone else if naming by blend mode is your thing:

     

    https://www.ps-scripts.com/viewtopic.php?f=66&t=40800

     

    /*
    Selected Layers to Blend Mode Name v1.jsx
    v1.0, 25th June 2022, Stephen Marsh
    Based on the code that I wrote for:
    https://www.ps-scripts.com/viewtopic.php?f=66&t=40800
    */

    #target photoshop

    function main() {

    // Save the current dialog display settings
    var savedDisplayDialogs = app.displayDialogs;
    app.displayDialogs = DialogModes.NO;

    // Select all layers
    app.runMenuItem(stringIDToTypeID("selectAllLayers"));

    // Get the selected layers: courtesy of jazz-y
    var s2t = stringIDToTypeID;
    (r = new ActionReference()).putProperty(s2t('property'), p = s2t('targetLayersIDs'));
    r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
    var lrs = executeActionGet(r).getList(p),
    sel = new ActionReference();

    // Loop over the selected layers: courtesy of jazz-y
    for (var i = 0; i < lrs.count; i++) {
    sel.putIdentifier(s2t('layer'), p = lrs.getReference(i).getIdentifier(s2t('layerID')));
    (r = new ActionReference()).putIdentifier(s2t('layer'), p);
    (d = new ActionDescriptor()).putReference(s2t("target"), r);
    //d.putBoolean(s2t("makeVisible"), false);
    executeAction(s2t('select'), d, DialogModes.NO);

    // If layer name = Layer 1 | Layer 02 | Layer 003 etc. (case sensitive)
    if (app.activeDocument.activeLayer.name.match(/^Layer \d+/)) {
    // Call the layer rename function
    lyrNameToBlendName();
    }
    }
    // Finish the loop

    // Restore the dialogs
    app.displayDialogs = savedDisplayDialogs;
    }


    function lyrNameToBlendName() {
    var lyrBlendMode = app.activeDocument.activeLayer.blendMode.toString().replace(/(?:^.+\.)(.+)/, '$1');
    var lyrBlendLC = lyrBlendMode.replace(/LIGHT$/, ' LIGHT').replace(/MIX$/, ' MIX').replace(/COLOR$/, ' COLOR').replace(/DODGE$/, ' DODGE').replace(/BURN$/, ' BURN').replace(/LINEAR DODGE$/, 'LINEAR DODGE (ADD)').toLowerCase();
    var lyrBlendPC = (sentenceCase(lyrBlendLC));

    function sentenceCase(str) {
    /* https://www.geeksforgeeks.org/convert-string-to-title-case-in-javascript/ */
    if ((str === null) || (str === ''))
    return false;
    else
    str = str.toString();
    return str.replace(/\w\S*/g,
    function (txt) {
    return txt.charAt(0).toUpperCase() +
    txt.substr(1).toLowerCase();
    });
    }

    var suffix = app.activeDocument.activeLayer.name.replace(/(?:.+)( \d+$)/, '$1');
    app.activeDocument.activeLayer.name = lyrBlendPC + suffix;
    }

    // Single history stage undo
    activeDocument.suspendHistory("Selected Layers to Blend Mode Name v1.jsx", "main()");

     

    1. Copy the code text to the clipboard
    2. Open a new blank file in a plain-text editor (not in a word processor)
    3. Paste the code in
    4. Save as a plain text format file – .txt
    5. Rename the saved file extension from .txt to .jsx
    6. Install or browse to the .jsx file to run (see below)

    https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html?m=1

    Translate
    Sameer K
    Community Manager
    Community Manager
    Feb 25, 2026 10:40 AM UTC

    Hey, ​@chromax. Welcome to the Photoshop Community. Thanks for bringing this up. 

    Photoshop’s AI Assistant was made available during the MAX in Oct’25. Head here to learn more: https://blog.adobe.com/en/publish/2025/10/28/our-view-agentic-ai-assistants-that-work-you-in-your-favorite-apps

    Please check if the private beta in Photoshop Web is available for you to try in here: https://photoshop.adobe.com

     

    I’ll merge your post into existing requests for the same feature set soon. Thanks!

    Sameer K

    Translate