Importing Keywords from a File
Part 2 of 3 in Keywording Photographs
Last time I talked about what makes good keywords and started talking about how to get keywords into your library software. This time we’re going to cover how to create a keyword import file to get many keywords into Lightroom quickly.
Importing a keyword file saves a significant amount of time and allows for almost all of the options that can be set in the Edit Keyword Tag dialog to be set ahead of time. The two options that can’t be set directly are Export Containing Keywords and Export Synonyms. But you can set specific keywords not to export as well as assigning synonyms to them.
The keyword file format is quite simple. Each keyword is entered on a single line. Indented lines denote that a keyword is a child of another. It’s very important, the indenting MUST be done using tabs not spaces or Lightroom won’t interpret the file properly. Finally brackets ([ & ]) and braces ({ & }) can be used to change the meaning of a word. The easiest way to explain this is through an example.
- Animal
- {animals}
- Bird
- [North American]
- Red-Shouldered Hawk
- {Buteo lineatus}
- Red-Shouldered Hawk
- [Asian]
- Fairy bluebird
- [North American]
Figure 1: Sample Keyword File Excerpt
Figure 2: The results of importing the file from Figure 1.
Figure 2 shows how the sample keyword list in Figure 1 was actually imported. The keywords Red-Shouldered Hawk and Fairy Bluebird are a lighter gray because they aren’t assigned to any images yet, nor do they have child keywords. The keywords in braces are made synonyms of the keyword that it’s a child of, as can be seen in Figure 3. Finely keywords surrounded in brackets are set not to export (figure 4).
Now that we know the markup, we can quickly start to build large databases of keywords in our favorite text editor or even a spreadsheet program that can export tab-delimited text files. The following screen shots show the same keyword file opened in Excel and Notepad.
The final step is loading the keywords into Lightroom. We do this through the Metadata menu, and Import Keywords. Selecting Import Keywords will bring up a standard open file dialog box through which you navigate to the text file you saved your keywords as. When you’ve selected your keyword file in the dialog box, click open and Lightroom will begin processing the keyword file. After a few moments, the Keyword List panel will be populated with your new keywords.
A couple of things to note, the import process will not remove keywords it only adds more. In addition, it doesn’t try to figure out where you want things blended. That is if you have a category “Bird” like in the example above, and you import another file of keywords that also has a Bird category but it’s not indented the same and under the same keywords, Lightroom won’t match them up. It will simply add another group of keyword to the keyword list.
If you already have a bunch of keywords and want to add a bunch more the safest way to do that using the import keyword method is to first use the Export Keywords menu command to create a file that matches your existing keyword list and edit that. In this case, you can also delete any keywords that aren’t relevant to what you’re trying to add to keep the file more manageable.
Next time we’ll look at the other two methods of adding keywords to the hierarchy, manually adding them to the keyword list and using the “Click here to enter keywords” text box.
Read the rest of this series
- Basic Keywroding Concepts
- Importing Keywords from a File
- More on Hierarchies
Support Us
If you found this article useful please consider using the following link and buying something for yourself from Amazon.com or donating a couple of bucks to help keep content like this coming.





Guido Zsilavecz said:
Good day:
Doing the following:
Animal
{animals}
Bird
[North American]
Red-Shouldered Hawk
{Buteo lineatus}
specifically, the last two lines, is not ideal: it places the common name and the scientific name on an equal level, which causes hassles when having several birds below each other. For example, importing the following:
Animal
{animals}
Bird
[North American]
Red-Shouldered Hawk
{Buteo lineatus}
Bald Eagle
{Haliaeetus leucocephalus}
and re-exporting results in
Animal
{animals}
Bird
[North American]
{Buteo lineatus}
{Haliaeetus leucocephalus}
Red-Shouldered Hawk
Bald Eagle
and assigning the tag “Bald Eagle” attaches both “Buteo lineatus” and “Haliaeetus leucocephalus” as tags to the image on export – which is not what you want. The strategy is to make the scientific name the child of the common name, as follows:
Animal
{animals}
Bird
[North American]
Red-Shouldered Hawk
{Buteo lineatus}
Bald Eagle
{Haliaeetus leucocephalus}
That way the tagging is correct, and Bald Eagle tag receives the scientific name as expected, as well as “Bird” and “Animal”.
After following this tutorial I thankfully discovered this problem early enough before I had tagged too many images – as the taxonomic tree I created is quite large and required a few hours of rework to get “right” again!
Thanks,
Guido
V. J. Franke said:
@Guido: Good catch, thanks. Not sure how that happened, since I do show the indenting correctly in the notepad screenshot, yet somehow managed to lose the tab in the clip at the top of the article. Whoops!
For the record, I’ve updated the excerpt at the top of this article to have the proper indenting.