How to code qualitative data

By Dr. Rafiq Muhammad, MD, PhD · Updated June 2026

Coding means tagging segments of your data — a sentence, a passage — with short labels that capture their meaning in relation to your question. Those codes let you find and compare related material across everything you collected, and they’re the raw material your themes or categories are built from. Done consistently, coding is what makes a qualitative analysis defensible.

Inductive vs deductive coding

Two cycles

Coding usually happens in passes. First-cycle coding stays close to the data (descriptive, in-vivo using participants’ own words, process codes). Second-cycle coding groups and abstracts those into categories and patterns. Don’t expect your first codes to be your final ones — they evolve.

Build a codebook

A codebook keeps coding consistent — within your own work over weeks, and across coders. Each code gets:

Code name: Definition (what it captures): When to apply (inclusion): When NOT to apply (exclusion): Example quote:

Software (CAQDAS)

Tools like NVivo, ATLAS.ti, MAXQDA, Dedoose, and the free, open-source QualCoder organise codes and retrieval — but they don’t interpret for you. The analytic thinking stays yours; the software just keeps it tidy and auditable.

The free Qualitative Coding Planner gives you a step-by-step coding plan for your approach (thematic, grounded, content, framework, IPA), a copyable codebook template, and a rigor checklist.

Get the free Qualitative Analysis toolkit

A codebook template, a coding worksheet, and a QualCoder walkthrough from QDA with ChatGPT and QualCoder. We’ll email you the download link.

One email with your download, then occasional research tips. One-click unsubscribe, anytime. We never sell your data.

Get QDA with ChatGPT and QualCoder

Frequently asked questions

What is coding?

Labelling segments of data with short tags that capture meaning, so you can retrieve and compare related material — the basis for themes.

Inductive vs deductive?

Inductive = codes emerge from data; deductive = start from a theory-based codebook; most studies blend both.

What is a codebook?

A document defining each code (name, definition, inclusion/exclusion, example) to keep coding consistent.

What software?

NVivo, ATLAS.ti, MAXQDA, Dedoose, or free QualCoder — they organise, they don’t interpret.

Trustworthiness & rigor → Open the Coding Planner →