Creating Codes and Coding

One of the main tasks NVivo is used for is coding. NVivo has a Coding section from the left menu, with a folder called Codes. These codes act like containers to hold all the references to that code.

If you have already decided upon codes ahead of time (following a deductive approach to coding), you can add these codes to NVivo and then start using them. Other times, as mentioned, you will be reading your materials in NVivo and creating codes as you go (an inductive approach to coding). And sometimes you will do a combination of this, where you have a rough idea of some codes you expect to see, but then new codes might emerge for you as your read through the materials. For this example, let’s try this combo method. First, we will create a few codes that we will use to code our materials, and then I will show you how to create codes on the fly as you are reading.

  1. From the left menu, under Coding, select Codes. Then go to the Create menu,and from the Code drop-down menu, select New Code to create a new code.

    Under the Coding menu on the left, select Codes. Under the top menu select create, code and new code.

  2. For the code name call it “Budget”. You can add a description for your codes if you like. You can describe them in more detail and give examples of where it would be applied to understand how to use it in coding. We will just leave it blank for now. Ignore the “Aggregate coding from children” option for now. We will discuss it later. Select Done.

    In the code properties pop-up, Budget is the title and done is selected

  3. You should now see our new Budget code listed in the Coding folder.

    Under Codes is a code labelled budget.

  4. Repeat the last three steps to also create a code called “Maintenance.” If you make a mistake, you can always select a code and hit the Delete key to remove it (be careful with this option if you have started coding!).

    Under the Codes section, there are two codes, Budget and Maintenance

  5. You can also edit your codes after creating them. Hold down the Control key and click on a code to bring up the context menu.

    A menu for one of the codes is open and Get Info is selected.

  6. If you select Get Info, you can rename it or add a description.

    Under the maintenance code menu, the general settings are selected

  7. Now that we have a couple codes, let’s use them to do some coding. To open up one of our imported files, from the left menu, go to the Interviews folder under Files and double click on the first interview transcript to open it in NVivo.

    Under interviews, the first interview is selected

    Note: NVivo can open a lot of different file types directly in the tool. The files will be open as read-only, meaning you can’t edit them. This is intentional to prevent error. However, if you happen to notice an error you want to correct, you can select the Edit checkbox at the top of the file. Then you will be able to make changes to the file. Remove the checkmark by clicking on it, to finish editing.

  8. With the file open, you can then read through it and code. Highlight some text you want to code, and then hold down the Control key and click on the highlighted text to bring up the context menu.

    When holding control and selecting highlighted text, a pop-up appears

  9. Select Code Selection, and then To Existing Codes or Cases

    In the pop-up menu, select code selection and To existing codes or cases

  10. Next, put a checkmark next to the Code you want to use to code this text, such as Budget. Then click on Select. Now it is coded.

    New code window with the budget node selected

    Note: Generally, you want the text to match the code, but for now, don’t worry if the text doesn’t match, this is just to quickly show you how it works.

  11. Let’s look at an alternative quick way to code. This time before you code, click on the Codes folder. This should open up the Codes list next to your transcript.

    Codes list open

  12. Highlight some text you want to code, and then drag the highlighted text over to the Code you want to code it. Let’s drag some text over to the Maintenance code. This is a fast and visual way to code. This is a good approach, as you can see the full list of codes while you are coding.

    Some interview text selected, with with a rex box around it and an arrow pointing to the Maintenance code.

  13. So far we have been coding using our pre-made codes. However, sometimes, something unexpected might come up that you want to create a new code to code it. Highlight some text, and then hold down the Control key and click on it to bring up the context menu.

    Some interview text selected, with an open context menu highlighted.

  14. Now, select Code Selection and then select To New Code….

    Context menu with Code Selection opened and To New Code... selected.

  15. Here you can give it a name, for example, “Teamwork” and select Done to create a new code on the fly.

    Code properties with the Name field completed with Teamwork and Done highlighted.

  16. So far we have been coding Word documents, but let’s look at the PDFs we imported as well. First close the current interview transcript you have been working with. There are a few ways you can do this. These techniques can be used any time you would like to close a window.

    Option 1: From the Toolbar at the top of your screen, go to the View menu, and select Close “[file name]”. Alternatively, you can close all items from this menu as well.

    In the view drop-down menu, Close "[File name]" is selected.

    Option 2: Hover over the the tab for your item within the program, and select the X to close it.

    On the tab for the open document, there is an x. It is highlighted.

    Option 3: On the right-hand side of the screen, select the icon with three lines. From there it will give you an option to Close All. Please note this option will only let you close all items that are open.

    An icon with three lines is selected, from there Close All is selected.

  17. Go to the Focus Groups folder and open up “NYC Data Center FG1 Questionnaire 7” (you might have to resize the window and/or column to read the full names of the files).

    Left menu with a red box around Focus Groups, Questionnaire 7 highlighted.

  18. This PDF file has been OCR’ed, meaning you can select text and code it as we have done before. Try selecting some text.

    Some text selected and highlighted.

  19. Now open up “NYC Data Center FG1 Questionnaire 14.”

    Focus Group file list, Questionnaire 14 highlighted.

  20. This PDF file has not been OCR’ed, meaning you can’t select the text and code it as we have done before. Instead NVivo treats this more like an image. You can draw a box around a section of text that you would like to code to select it, and then code as normal. Generally, though, it is better to make sure that any PDFs you import into NVivo are OCR’ed for ease of coding. This will also be important when running queries, which we will look at later. For now, close these two PDFs.

    A section of the questionnaire that has been selected. Context menu has the code option selected.

    Note: If OCR’ing PDFs is new to you, this guide might help.

  21. From the left menu, under Coding, select Codes, and then double click on a Code that has some references (meaning it has been used to code some text).

    In the Codes list a red box around the Budget Code

  22. Here you will see all the snippets of text that were coded to this Code.

    The Budget Code window with the coded text snippet.

  23. If you later realize that you mistakenly coded something you didn’t mean to code, you can uncode it. Highlight one of the references listed. Hold down the Control key and click, select Uncode Selection, and then select From This Code.

    Context menu for the coded text with Uncode Selection selected and From This Code highlighted.

Technique: Qualitative Data Analysis | Tools: NVivo


First created: November 20, 2023
Last updated: May 12, 2026

Tutorial maintained by Kelly Schultz.

Tutorial created by Kelly Schultz.

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International icon