PS_BRAMUS.TextExport 1.3 – Automatically export all Text layers from Photoshop PSD to a Text file (PSD2TXT)

JSXColleague Johan asked whether someone could knock up a script which exports all text layers from a Photoshop document to a text file (viz. a PSD2TXT tool/script), enabling one to slice even faster than he already can. Last week I released the first version of the script (v 1.2), now it’s time for an update.

What has changed?

  • UPD: Base rewrite, now gets all layers (sets & regular ones) in one variable.
  • UPD: Gives a nice warning, instead of a javascript error, when no file is open.
  • ADD: Layer Path & Layer Name in export.
  • ADD: Cycle Multiple Files when more than one file is open (user can still choose to only parse the current document though).

Download PS_BRAMUS.TextExport (PSD2TXT)

Update November 2008:
PS_BRAMUS.TextExport is outdated and has been replaced with PS_BRAMUS.TextConvert which does both import and export!

Download PS_BRAMUS.TextExport 1.3

Installation / How to use

  • Download PS_BRAMUS.TextExport from the link above
  • Extract it to Presets/Scripts folder of your Photoshop installation folder (defaults to C:\Program Files\Adobe\Adobe Photoshop CS3\Presets\Scripts on Windows)
  • Restart Photoshop if it was already running
  • Open the PSD you wish to export text from
  • Now, when having a file opened, go to File > Scripts and select PS_BRAMUS.TextExport.1.3 from the list. textexport-small.jpg
  • Wait until the output file appears 🙂


Three settings in PS_BRAMUS.TextExport can be configured, all to be found in the .jsx file itself.

  • Open up PS_Bramus.TextExport-1.3.jsx with your favorite texteditor
  • If you want to choose where to save the file to, set useDialog to true. If set to false (default), the output file will be saved into your documents folder
  • If you don’t want the exported file to be openend after the export has run, set openFile to false. If set to true (default), the output file will automatically be opened by your default text editor.
  • In the export file, each line is separated by a separator string. Change this one to use one you like (defaults to *************************************).

When running PS_BRAMUS.TextExport on multiple files, the useDialog & openFile parameters will be overriden. All files will be saved as nameofyourpsdfile.txt in your documents folder and only a notice that the files were saved will be shown.


I’ve tested PS_BRAMUS.TextExport with a pretty complex PSD, which holds the design of 3RDS. Here are the results:

Input PSD

TextExport Input

Output TXT

TextExport Output

Make a donation

It certainly is no obligation but it would most certainly put a smile on my face 😉

Original Content , , ,

59 Responses to PS_BRAMUS.TextExport 1.3 – Automatically export all Text layers from Photoshop PSD to a Text file (PSD2TXT)

  1. Pingback: » PS_BRAMUS.TextExport 1.2 - Automatically export all Text layers from Photoshop PSD to a Text file

  2. Wolf says:

    we probably need to get the word out a bit more, I think a lot of people could use this but don’t realize what a time saver this could be.

  3. Pingback: links for 2008-03-20 « tscpannex

  4. T says:

    I am writing a text exporter for PS, so I surfed web and found yours.

    the thing is….I need to get every character in a text string, and write each character out as ASCII Unicode hex to a text file.

    like this…..

    I tried Constants PrintEncoding and SaveEncoding, but no luck

    got any suggestions?


  5. Pingback: PS_BRAMUS.TextExport 1.3 · Style Grind

  6. Guess i’m slow today, but when is this script helpful? I am trying to picture a scenario when you have so much text in a photoshop file that you could use this script, but i can’t get one made up in my head.

    An example please? 🙂

  7. Nevermind, i totally oversaw that it could come to use when in slice mode. Never did that 🙂

  8. jeff says:

    I’ve been searching for this functionality for quite a while… with no luck.
    A coincidence I stumbled across this page.

    A cool script!

    Do you have plans to create a text importer script?
    one that opens a text document into a Photoshop text layer.

    …The amount of text i’d need to bring in requires a batch process.

    just a thought



  9. stoney says:

    This scenario is helpful when comparing the text in the PSD to a copy deck (requirements document) in a corporate environment

    I’m not seeing all the text outputted… but i did get an error about no having the correct fonts when the psd loaded… could that be the culprit?

  10. Bramus! says:

    @Jeff: that’s possibile, but will look a bit cluttered as you’re inserting lots of text all in the same font/colour/etc.

    @Stoney: that could indeed be the problem. Will run some tests.

  11. billig mobil says:

    Wow! I didn’t know that there is already a script like this and I am glad that this is offered for free. I have some PSD files with a bunch of text on it. I hope I can extract those texts through this script and if it can, I think it is a OCR better alternative.

  12. Garrett says:

    Doesn’t look like Photoshop 7 can use it. Can’t find a scripts folder, or that file format. Too bad, I have several text layers.

  13. Pingback: De PSD a TXT, facil! |

  14. Pingback: De PSD a TXT, facil! | Eliseos.Net

  15. Martin says:

    This script would be extremely handy for extracting text when translating PSDs. However, I am looking for a scriptable version, i.e. something I can run from the command line. Any ideas? Even better, the script should drop in some ID for each string extracted, and then also be able to do a search and replace for the ID, to slot in the translated text automatically.

  16. Bramus! says:

    @Garret: Scripts are supported starting from Photoshop CS or higher.

    @Martin: Scriptable from command line is not possible (unless you’re running windows (@see) … but then the script will open Photoshop nonetheless). And search and replace would be something you’d do in a text editor 😉

  17. Pingback: » PS_BRAMUS.TextConvert: PSD2TXT and TXT2PSD for the masses!

  18. Pingback: PS_BRAMUS.TextExport 1.3 | Castup

  19. Pingback: PS_BRAMUS.TextExport 1.3 « Internet Turnkey Websites

  20. Danila says:

    Very useful scipt. Thank you very much!
    I look forward for the feature that will import unicode text (for example Russian text). Now I can only see question marks after import.

  21. Tomas says:

    Just wanted to say thanks for great plugin! Thanks!

  22. phreakiphred says:

    v1.3 Excellent Smithers, Excellent

  23. Oolex says:

    Life saver.

    Thank you so much!

  24. Pingback: .psd?????????????????????.txt?????????????.jsx | ????????

  25. Gregory Cox says:

    You ROCK. Thanks for saving me about 4 hours. Karma points!

  26. Rob says:

    Crashed my CS3 4 times in row – ‘uninstalled’ – so promising, so bad

    Great for writing BLANK text files though!

  27. Pingback: Pepper C???????? | PSD?????????

  28. Pingback: Photoshop Scripts « JakeIntel

  29. Pingback: 目から鱗!PhotoshopのPSDデータからテキスト抽出する方法 – [Mu]ムジログ

  30. Pingback: Extracting texts from images | Amy Wanmei Huang

  31. tamiort says:


    This is going to save me hours. Is there any way I can export just the layer content? Meaning without anything added like, “LayerPath: / LayerName: …. -LayerContent:”

    Also, how can I save these files next to the psd that they came from when batching, rather than my documents folder? I am pulling from multiple pads located in many different folders.


  32. Pingback: Script Shortcuts | Team Think Labs

  33. Ryuzul says:

    Hi Bramus, thanks for the script, helped out at work today quite a lot. Though I encountered an issue with chinese characters. Fixed it by editing the encoding format of the script. Here’s the hard fix for anyone having the same issue:

    After line 118 add(or just right after “fileOut.linefeed = fileLineFeed;”) :
    fileOut.encoding = “UTF-16”;

    Thanks again Bramus!

  34. Pingback: Photoshopでの制作時間を短縮するためのJSX | JIUKO

  35. Pingback: Photoshopでの制作時間を短縮するためのJSX | JIUKO

  36. Pingback: Photoshopのテキストレイヤーからテキストを抽出する方法 | Web雑記帳。

  37. Pingback: 2004 – 2012 » Esportare un testo da Photoshop.

  38. Pingback: 20 Great Time-Saving Photoshop Scripts

  39. Logan says:

    Thx 🙂

    but can we export all data in excel instead notepad ?

  40. Pingback: פיקסלגיק: הפוסטים החמים בעולם העיצוב השבוע [7-12-13] | גיקטיים

  41. Pingback: פיקסלגיק: קישורים להדרכות, חינמיים, השראה, תכנות פרונט אנד, עיצוב לסטארטאפים וחווית משתמש [12-12-13] | פיקסל פרפקט מגזין

  42. Pingback: The 30 Most Useful Free Photoshop Scripts

  43. Pingback: grooving-earth Photoshopを便利にするプラグイン8つ

  44. Jamie says:

    Thanks for this!
    I’m wondering if the opposite is possible?
    Like can I have a text file, and create a text layer for each line of text in the file?

  45. Micah says:

    You are my favorite. I’ve used this so many times.

  46. Pingback: PSDから簡単コーディング!Extract for Brackets使い方のコツ

  47. Allen says:

    I would surely like to check this script out, thanks for this. It would mean a great deal with the PSDs I handle everyday. I will post this on my FB page as well for people and fellow designers to be aware, you can also follow me @pixel_ramen in my twitter account.

    Again, thanks! 🙂

  48. Pingback: Webサイト制作に役立つPhotoshopの拡張機能・プラグイン20個 | NESTonline Blog

  49. NewYears1978 says:

    I love this, worked perfectly every time.

    One thing I would like to change (and been trying to sort out on my own) is how to remove all the extra stuff in the output.

    I want ONLY the layer text nothing else in the file. 🙂

    (Meaning no headers, titles, etc, just the text from the text layer)

  50. Pingback: Photoshopのレイヤーからテキストを一括取得 | パチスロ日記と仕事メモ

  51. Devi Saranya B says:

    Using Bramus text export I cannot export thailand language font…
    What is the reason for this?

  52. Devi Saranya B says:

    Okay Thanks….

  53. Pingback: PSDファイルからテキストを抽出するJSX

  54. bruno says:

    sorry for answer, but maybe ….
    I have one illustration with lot of short text (300 micro-sentence)
    with your script, I can extract this layers on one .txt file to send this job to my friend for translation.
    He wright, after “content”, “Translate :”, and the sentence at the line after.
    and after, he send me this .txt file.
    I must to change this text 1 time for 1 mounth, hard, long and no-fun action 🙁

    So …. it’s possible to envisage one “replace” function on script ?
    i’m not bad developper, but …. no java. and no photoshop. and on the future, it’s not reusable competence.

    it’s for one private project : this illustration is for society game club.

    thank for your possible answer 🙂

  55. Ian says:

    Hi, is it possible to extract the text from the top layer to the bottom layer.

    Currently the script runs from the bottom layer up.

    We receive files with many text layers and the artwork is always designed from top to bottom which affects the extracted text.

    A great script and any help is much appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.