Shoot RAW for the most editing quality, share JPG because it opens everywhere, and use DNG when you want a standardised, future-proof archive of your RAW files. They're not competitors — each solves a different stage of the photo's life, from capture to edit to sharing.
The one-line answer
Capture in RAW, archive in RAW or DNG, and share in JPG. RAW is your editable master, DNG is a brand-neutral way to store it long-term, and JPG is the finished copy you actually send to people.
RAW: maximum quality, minimum convenience
RAW holds the sensor's full 12–14-bit data and dynamic range with nothing baked in, giving you the most latitude to edit exposure, white balance and colour. The cost: large files (often 20–50 MB each) that won't open in most apps or upload forms without conversion. Shoot RAW when the photo matters and you'll edit it.
JPG: small, universal, already finished
JPG is 8-bit, compressed and processed — small, and readable by literally everything. It has little editing headroom, but for sharing, posting, printing and emailing that doesn't matter. This is the format you export to when you're done.
DNG: the standardised archive format
DNG is Adobe's open RAW standard. Converting a proprietary CR2, NEF or ARW into DNG gives you one documented format for your whole library, so it stays readable even if a manufacturer's software is discontinued. Many phones (iPhone ProRAW) and drones already shoot DNG directly.
Which should you shoot?
RAW, if your camera offers it and you plan to edit — the extra latitude is the whole point. If you never edit and want files ready to share straight off the card, JPG (or RAW+JPG together) is fine. There's no quality penalty to shooting RAW; the only cost is storage and an export step.
Which should you share?
Always JPG. Nobody can open your ARW or NEF without special software, and most upload forms reject them. Convert RAW to JPG once you've finished editing — it runs in your browser with no upload. Worried about quality? See does converting RAW to JPG reduce quality.
Which should you archive?
Keep the original RAW as your master. If you want extra future-proofing — especially across mixed camera brands — convert copies to DNG for a single standardised archive. For how the formats fit together, see the RAW photo formats guide.