How do I seal just the grout and keep the sealer off the tile?

With some surface types you don't want to seal the surfacing, only the grout. For instance, granite, marble, porcelain, glazed tile, stone look tile, and other non-absorbent finishes. For exceptions to this - see the particular surface type.

The easiest sealer to use for this is Aldon Same Day Sealer. This sealer is water base and does not create gloss. Therefore, the inevitable flow onto the edge of the tile faces will easily wipe off. Also, this sealer comes in quarts as well as gallons. The quarts have an applicator spout for grout joints.

If you are using a sealer other than "Same Day Sealer", the easiest way to do grout joints is to use a plain paper cup. A paper cup is not effected by petroleum solvents. You can crimp the cup to create a pour spout. The smaller the cup, the easier it is to control the pour.
You may still get a little sealer on the tile face, but each product label describes how to remove it.

If some "color enhancement" is required to blend slightly mismatched grout colors, the best choice is Aldon S-B-S Sealer.

See Surface Types and the page on grout for more information.