Sweet onions are similar in net carbs to other onions like yellow or red. A quarter cup is slightly more than 3 net carbs, similar to a yellow onion. Most onions can be included in a low-carb and keto diet in moderation. Shallots are the highest in carbs and should be minimized on a keto diet.